The Beginner’s Guide to Data Cleaning in Excel and Python

Here’s a secret: 70–80% of a data analyst’s time goes into cleaning data, not analyzing it.
Sounds boring? Maybe. But without clean data, your analysis is like building a house on quicksand—it just won’t hold.

So if you’re starting your journey in data analytics, learning data cleaning is step one. And the good news? You can start with the tools you already know—Excel and Python.

Let’s break it down in simple steps.


What is Data Cleaning?

Data cleaning (or data preprocessing) means:

  • Removing mistakes and duplicates
  • Fixing missing values
  • Making sure the data format is consistent
  • Getting rid of irrelevant information

Think of it like washing vegetables before cooking. You can’t skip it if you want good results.


Step 1: Cleaning Data in Excel

Most beginners start here because Excel feels familiar.

1. Remove Duplicates

Go to Data → Remove Duplicates.
Excel instantly checks for repeated rows and deletes them.

💡 Example: If the same customer’s email is repeated twice, one entry is deleted.

2. Handle Missing Data

Use filters to check for blank cells. You can:

  • Delete them (if they’re not important)
  • Fill them with averages or “N/A”
  • Use Excel’s =IF() formula to replace blanks

💡 Example: If age data is missing, you might fill it with the average age.

3. Standardize Formats

Dates, numbers, and text often come in messy formats.

  • Use Text to Columns for splitting names or addresses
  • Apply Format Cells to fix dates or numbers
  • Use =PROPER() or =TRIM() to clean text

💡 Example: Turning “JOHN DOE ” into “John Doe.”

4. Spot Outliers

Create simple conditional formatting to highlight values that look odd.

💡 Example: A salary of 1,000,000 in a dataset where the average is 30,000.


Step 2: Cleaning Data in Python

Once you get comfortable, Python takes your cleaning game to the next level.
We use the library pandas for most tasks.

import pandas as pd

# Load your dataset
df = pd.read_csv("data.csv")

# Remove duplicates
df = df.drop_duplicates()

# Handle missing values
df["Age"].fillna(df["Age"].mean(), inplace=True)

# Standardize text
df["Name"] = df["Name"].str.strip().str.title()

# Detect outliers
print(df.describe())

💡 Why Python? Because it handles large datasets much faster than Excel.


Excel vs Python: When to Use What?

FeatureExcelPython
Best forSmall datasetsLarge datasets
Ease of UseBeginner-friendlyRequires coding
FlexibilityLimited formulasEndless possibilities
SpeedSlower with big filesLightning fast

👉 Start with Excel. Move to Python when you’re ready for bigger challenges.


Real-Life Example: Cleaning Sales Data

Imagine you get a sales file with these issues:

  • Customer names written in ALL CAPS
  • Some phone numbers missing
  • Duplicate entries for the same person

In Excel, you’d:

  • Use =PROPER() for names
  • Fill missing phone numbers with “NA”
  • Remove duplicates with one click

In Python, you’d:

  • Use .str.title() for names
  • .fillna("NA") for phone numbers
  • .drop_duplicates() for duplicates

End result? A clean, reliable dataset ready for analysis.


Why Data Cleaning Matters

Bad data = bad decisions. Simple.

💡 Example:

  • If customer data has duplicates → You might send the same offer twice, wasting money.
  • If product prices are inconsistent → Your profit analysis will be wrong.

Clean data means accurate insights, smarter strategies, and better results.


Conclusion

Data cleaning may not sound glamorous, but it’s the foundation of analytics. Without it, even the most advanced AI models will fail.

Start small: clean a simple Excel sheet. Then move to Python for bigger datasets. With practice, you’ll see patterns faster, and your insights will be sharper.

🚀 Action Step: Open your next dataset and spend 15 minutes just cleaning it. You’ll be surprised how much clarity you gain.

I’m Ankush Bansal, a data analytics professional and business analyst passionate about turning numbers into meaningful insights. I simplify complex data to help individuals, students, and businesses make smarter decisions.

Leave a Reply

Your email address will not be published. Required fields are marked *