EDA Workflow End-to-End (Project 1)
Put it all together: a complete Exploratory Data Analysis โ load, clean, summarize, visualize, and extract insights โ the skill interviewers most want to see demonstrated.
Learning Objectives
- Explain what EDA is and why it comes before any formal analysis.
- Follow a repeatable EDA workflow: load โ inspect โ clean โ summarize โ visualize โ conclude.
- Distinguish univariate, bivariate, and multivariate analysis.
- Identify missing values, outliers, and relationships in a real dataset.
1. What Is EDA?
Exploratory Data Analysis is the process of getting to know your data โ its structure, distributions, missing values, outliers, and relationships โ before building models or drawing conclusions. It answers "what does this data actually look like?"
2. The 6-Step EDA Workflow
- Load โ read the data into a DataFrame.
- Inspect โ shape, head, info, columns, dtypes.
- Clean โ missing values, duplicates, outliers.
- Summarize โ
describe()and groupby stats. - Visualize โ univariate and bivariate plots.
- Conclude โ write down insights and recommendations.
Memorize this workflow โ it's exactly what you'll narrate in an interview.
3. Univariate, Bivariate, Multivariate
A favourite EDA interview question โ it's just "how many variables at once?"
| Type | Variables | Typical plot |
|---|---|---|
| Univariate | one | histogram, countplot |
| Bivariate | two | scatter, boxplot |
| Multivariate | three+ | heatmap, pairplot |
4. Project 1 โ End-to-End EDA on a Sales Dataset
Follow the six steps below. This is a complete, runnable EDA โ type it out yourself, don't just read it.
Step 1 โ Load
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv("sales.csv")
Step 2 โ Inspect
df.shape # (rows, columns)
df.head() # first 5 rows
df.info() # columns, dtypes, non-null counts
df.columns # column names
Step 3 โ Clean
df.isnull().sum() # missing values per column
df = df.drop_duplicates() # remove duplicates
df["price"] = df["price"].fillna(df["price"].mean()) # fill missing
Step 4 โ Summarize
df.describe() # summary statistics
df.groupby("region")["sales"].sum().sort_values(ascending=False)
Step 5 โ Visualize
# Univariate โ distribution of sales
sns.histplot(df["sales"], bins=20)
# Univariate โ category counts
sns.countplot(x="region", data=df)
# Bivariate โ sales by region (boxplot)
sns.boxplot(x="region", y="sales", data=df)
# Multivariate โ correlation heatmap
sns.heatmap(df.corr(numeric_only=True), annot=True)
Step 6 โ Conclude
Write 3โ5 bullet insights, e.g. "South region has the highest median sales; Notebooks drive most revenue; a few high-value outliers skew the average."
5. Interview Questions (with Model Answers)
EDA is a near-certain interview topic. Self-test before revealing.
IQ1. What is EDA, and why is it important?
Model answer: "EDA is exploring and understanding your data โ structure, distributions, missing values, outliers, and relationships โ before formal analysis or modeling. It prevents wrong conclusions by surfacing data problems early."
IQ2. Walk me through your EDA workflow.
Model answer: "Load the data, inspect its shape and info, clean missing values and duplicates, summarize with describe and groupby, visualize distributions and relationships, then conclude with insights."
IQ3. What's the difference between univariate, bivariate, and multivariate analysis?
Model answer: "Univariate looks at one variable at a time; bivariate looks at the relationship between two; multivariate looks at three or more together. Histograms are univariate, scatter plots bivariate, heatmaps multivariate."
IQ4. How do you identify missing values and outliers during EDA?
Model answer: "For missing values I use isnull().sum(). For outliers I look at
describe() (min/max vs quartiles) and boxplots, which flag points far outside the whiskers."
IQ5. What's the first thing you check when you receive a new dataset?
Model answer: "Its shape and structure โ df.shape, df.head(), and
df.info() โ to understand how many rows/columns, the data types, and whether there's missing data."
IQ6. How do you use visualizations in EDA?
Model answer: "Histograms for distributions, countplots for category frequency, boxplots for distributions by group and outliers, scatter plots for relationships, and heatmaps for correlations."
IQ7. What does a boxplot show that a histogram doesn't?
Model answer: "A boxplot explicitly shows the median, quartiles, and outliers as points outside the whiskers โ making it easy to compare distributions across groups and spot outliers."
IQ8. How do you explore relationships between numeric columns?
Model answer: "With scatter plots for pairwise relationships and a correlation heatmap
(df.corr()) to see all correlations at once โ values near +1 or -1 indicate strong linear relationships."
IQ9. What do you do after EDA?
Model answer: "I summarize the key insights and recommendations in plain English, then decide the next step โ whether that's deeper modeling, a dashboard, or reporting the finding to stakeholders."
Key Takeaways
EDA = understand your data before drawing conclusions.
The workflow: load โ inspect โ clean โ summarize โ visualize โ conclude.
Univariate = 1 variable, bivariate = 2, multivariate = 3+.
describe() + boxplots are your first look at outliers.
Always end EDA with insights, not just charts.
Objective Questions โ Test Your Understanding
Q1. What is Exploratory Data Analysis (EDA)?
Q2. Which type of analysis looks at ONE variable at a time?
Q3. Which type of analysis looks at the relationship between TWO variables?
Q4. What is the FIRST step in the EDA workflow?
Q5. Which Pandas function gives summary statistics (mean, min, max, quartiles)?