Exploratory Data Analysis (EDA) is what you do before answering the real question: getting to know the data, finding its problems and spotting patterns worth investigating. Skipping it is how analysts end up presenting confident numbers built on broken data.
Here is a checklist you can follow on any dataset. The examples use a fictional used-bike marketplace, RideAgain, with a listings table.
Step 1: Understand the context
Before any code, write down:
- Who collected this data, and why?
- What does one row represent (a listing, a sale, a user)?
- What time period does it cover?
- What question will the analysis eventually answer?
Step 2: First look
import pandas as pd
df = pd.read_csv("listings.csv", parse_dates=["listed_on", "sold_on"])
df.shape
df.head()
df.info()Check that the number of rows is roughly what you expected and that each column has a sensible type. A price column read as text usually means there are stray characters such as commas or currency symbols.
Step 3: Data quality
df.isna().sum().sort_values(ascending=False)
df.duplicated().sum()
df.duplicated(subset="listing_id").sum()
df.describe()Look for:
- Missing values: how many, and in which columns?
- Duplicates: exact copies, or the same ID twice?
- Impossible values: negative prices, kilometres driven in the millions, sale dates before listing dates.
- Inconsistent categories: "Honda", "HONDA", "honda ".
Keep a short log of each issue and what you decided to do.
Step 4: One column at a time (univariate)
For numeric columns, look at the distribution:
import seaborn as sns
sns.histplot(df["price"])
sns.boxplot(x=df["km_driven"])For categories, count them:
df["brand"].value_counts().head(15)Ask: is it skewed? Are there outliers? Are some categories so small they should be grouped as "Other"?
Step 5: Relationships (bivariate)
sns.scatterplot(data=df, x="km_driven", y="price")
sns.boxplot(data=df, x="fuel_type", y="price")
df[["price", "km_driven", "age_years", "engine_cc"]].corr()- Numeric vs numeric: scatter plots and correlation.
- Category vs numeric: box plots or grouped averages.
- Category vs category: cross-tabs (
pd.crosstab).
Step 6: Time patterns
df.set_index("listed_on").resample("W")["listing_id"].count().plot()Look for trends, seasonality, sudden jumps (which may be data issues) and gaps.
Step 7: Segment
Compare groups that might behave differently: cities, brands, new vs returning sellers. Averages across everything can hide very different stories inside.
Step 8: Write down findings and questions
EDA should end in a short list:
- Data issues found and how they were handled.
- Patterns noticed (with a chart each).
- Questions worth investigating further.
This list is often more valuable to a manager than any single chart.
Common mistakes
- Making dozens of charts without a question in mind.
- Dropping missing values or outliers without investigating.
- Treating correlation in EDA as proof of cause.
- Not saving the cleaning steps as code, so the analysis cannot be repeated.
Practise
Our pandas and Seaborn tracks cover each step: first look, cleaning, distributions and relationships. The live projects then give you full, messy datasets to run this checklist on.
Practise what you just read
Reading helps; writing the code yourself is what sticks. Start here: