First inspect, then clean
Do not start by replacing values. First learn the shape, column types, missing values, duplicates, and strange ranges.
Your repo should show this thinking. A simple quality report proves you did not clean blindly.
What to inspect
Shape tells you how many rows and columns you loaded. Columns tell you what fields exist. Dtypes tell you how pandas understands each column.
In pandas 3.0, text columns are inferred as the dedicated str dtype by default. Older tutorials may call them object columns, so do not copy that assumption blindly.
Basic checks
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
Inspection script
Put this in a notebook or a small Python file after loading your raw data. It works well for a college placement dataset, UPI transactions, product orders, or any tabular CSV.
import pandas as pd
students = pd.read_csv("data/raw/students.csv")
print("Shape:", students.shape)
print("Columns:", students.columns.tolist())
print("\nFirst rows")
print(students.head())
print("\nLast rows")
print(students.tail())
print("\nInfo")
students.info()
print("\nNumeric summary")
print(students.describe())
print("\nMissing values")
print(students.isna().sum().sort_values(ascending=False))
print("\nDuplicate rows:", students.duplicated().sum())Use isna
Use isna() or notna() to detect missing values. pandas treats None as missing too.
Do not check missing values with equality. Missing sentinels do not behave like normal values, so df[col] == None or value == np.nan can mislead you.
Trusting dtypes too much
A column can have a dtype and still be wrong for your project. For example, a fees column may be str because values include ₹, commas, or words like pending.
Dates also often load as text first. In this lesson, just find the issue and record it. You will fix it in the cleaning lesson.
Quality report
Create a small report from each raw file. Commit it in your repo as reports/quality_notes.txt or print it from scripts/inspect.py.
This report is not a fancy dashboard. It is proof that you inspected the data before changing it.
# reports/quality_notes.txt
File: data/raw/students.csv
Shape: 500 rows, 8 columns
Possible key column: student_id
Missing values: email has 23, graduation_year has 4
Duplicate rows: 2
Type issues: fees is str, expected numeric rupees
Range issues: attendance_percent has values above 100
Notes: clean column names before joining with placements.csvDo this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done