Data Cleaning Case Study (Messy Dataset)
Part of the Data Analyst Roadmap
In short
Real data is full of typos, duplicates and blank cells. A cleaning case study shows employers you won't fall apart when the data isn't a tidy classroom CSV.
Deliberately take on a genuinely messy dataset and document your full cleaning process — showing employers you can handle real-world data, not just tidy tutorial datasets.

Think of it like this
Sorting vegetables after the mandi
You come home with a bag of muddy vegetables: some bruised, a few onions mixed with potatoes, one rotten tomato. Before cooking, you wash, sort and throw away the bad ones. Cleaning data is the same chore, and nobody cooks well without it.
Watch it happen
Cleaning one messy city column
1/5Raw values from a signup form. Four of them mean the same city, and one is blank.
The big ideas
What you need to know
Remove true duplicates
Check if repeated rows are real duplicates or real repeat orders. Use an ID and timestamp to decide.
Standardise text
Trim spaces, fix case and map aliases. Otherwise one city shows up as five.
Fix types and formats
Dates like 03/04/2026 can mean March or April. Parse them with the right format and check a few rows.
Log every decision
Keep a cleaning log: what you changed, how many rows and why. It's the heart of the case study.
See it in code
Walk through the code
1import pandas as pd2 3df = pd.read_csv("messy_orders.csv")4df = df.drop_duplicates()5df["city"] = (df["city"].str.strip().str.title()6 .replace({"Bombay": "Mumbai", "Mum": "Mumbai"}))7df["order_date"] = pd.to_datetime(df["order_date"], dayfirst=True, errors="coerce")8df["amount"] = pd.to_numeric(df["amount"].astype(str).str.replace(",", ""),9 errors="coerce")10print(df.isna().sum())11df = df[df["amount"] > 0]1/4Drop rows that are exact copies of another row.
A starter cleaning script. Each line fixes one kind of mess, and the isna check shows what's still missing.
Save yourself the pain
Common mistakes
Oops
Silently dropping every row with any missing value.
Do this instead
Check how many rows you'd lose and whether they're a special group. Report the choice you make.
Oops
Cleaning by hand in Excel with no record of what changed.
Do this instead
Clean with a script or a documented set of steps, so anyone can rerun it on new data.
Your mission
First milestone: a cleaning log
Quick check
Your date column has "03/04/2026". The data is from an Indian company. How should you parse it?
Go deeper
- 1Find (or intentionally create) a dataset with realistic messiness: missing values, inconsistent formats, duplicates.
- 2Document every cleaning decision and the reasoning behind it (Phase 8).
- 3Show before-and-after summary statistics to make the impact of your cleaning visible.
More projects at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.