Data Science ยท Chapter 6 of 43

Exploratory Data Analysis (EDA)

EDA uses summary stats and visualisations to understand a dataset BEFORE modelling.

Ask: what's the distribution? Are there outliers? How do features relate to the target?

Example 1 (python)
import pandas as pd
df = pd.read_csv('data.csv')
print(df.describe())
print(df.info())

One-line dataset summaries.

Example 2 (python)
import seaborn as sns
sns.pairplot(df, hue='target')

Visualise feature pairs by class.

Key points

  • EDA precedes modelling.
  • Use summary stats + plots.
  • Look at distributions and outliers.
  • Study feature-target relationships.
๐Ÿ’ก Note: EDA is where you build intuition. Never skip it to jump straight to modelling โ€” you'll pay later.

๐Ÿ“ Quick Quiz

1. df.describe() returns:

2. A pairplot shows:

3. EDA is done: