COURSE / REAL PRACTICE
From Python records to DataFrames
Translate records into actual Pandas operations with deliberate dtypes, missing-value policy, grouping grain and validated joins; reconcile the existing cleaning report.
Read the explanation and diagrams, then work through the practice. Your browser profile supplies your saved progress.
What you’ll work toward
Reimplement the existing records-based sales audit with actual Pandas and prove complete report parity on edge-case fixtures, including refunds, first-valid duplicate handling, unmatched keys and exact large integer amounts.
Read an explanation, inspect the diagrams and work through the available checks, debugging exercises and builds. Feedback and prerequisite links guide the next step.
Before you start
This course builds on these skills:
Individual lessons can add prerequisites. Your lesson progress shows your actual readiness.
A look inside the first lesson
Map records onto columns and an explicit index
import pandas as pd
frame=pd.DataFrame({"id":pd.array(["001","002"],dtype="string"),"cents":pd.array([0,None],dtype="Int64")})
print(frame["id"].tolist())
print(str(frame["cents"].dtype),frame["cents"].isna().sum())Your lesson sequence
Follow the same units and lessons in either view. Prerequisite links and your practice progress stay with each lesson.
Records, columns and selections
- LESSON 01.01
Map records onto columns and an explicit index
Construct actual string/nullable-integer columns and keep row labels distinct from business identity.
Open lesson - LESSON 01.02
Load CSV without guessing identifiers or missing data
Preserve leading-zero IDs and literal NA text with deliberate CSV settings and a checked schema.
Open lesson - LESSON 01.03
Select, sort and derive columns without losing alignment
Use nullable masks, stable ordering and exact integer-derived currency text while preserving the source index.
Open lesson
Missing values, grain and relationships
- LESSON 02.01
Separate missing, invalid and zero values
Classify source amounts without collapsing malformed data, absence and legitimate zero into one value.
Open lesson - LESSON 02.02
Aggregate at an explicit grain
Distinguish row count, known-value count and all-missing totals, including unknown key groups and overflow.
Open lesson - LESSON 02.03
Merge with cardinality checks and unmatched evidence
Reject duplicate/missing keys before a many-to-one left merge and retain an explicit match indicator.
Open lesson