Exploring Datasets

Exploratory Data Analysis (EDA) is the process of examining a dataset to understand its structure, spot patterns, and catch problems before building any model. This page walks through a typical EDA workflow using everything covered so far.

Step 1: Load and Inspect

import pandas as pd

df = pd.read_csv("students.csv")

print(df.shape)
print(df.head())
print(df.info())

Step 2: Check for Data Quality Issues

print(df.isnull().sum())
print(df.duplicated().sum())
print(df.dtypes)

Step 3: Summarise the Numbers

print(df.describe())
print(df["Score"].value_counts())
print(df.groupby("City")["Score"].mean())

Step 4: Ask Questions of the Data

# Which city has the highest average score?
print(df.groupby("City")["Score"].mean().sort_values(ascending=False))

# How many students scored above 80?
print((df["Score"] > 80).sum())
Good exploration is rarely a single pass - you inspect, clean, summarise, and then ask new questions based on what you find, often looping back through these steps several times.

You've Completed This Section

You've now covered the core Pandas workflow - from Series and DataFrames through to merging, cleaning, and exploring real datasets. Next, the course moves into the foundations of Data Science itself.

Ready to Master Data Science?

Join Uncodemy's Data Science Course and build real, job-ready skills with expert mentors.

Explore Course