Data Cleaning Exercises

Learn

The data cleaning curriculum

From missing values and Unicode to dates, duplicates, joins and reshaping. Each lesson ends with a graded exercise.
  1. Module 1

    Inspect before changing

    Read the brief and data dictionary, profile the schema, state assumptions and list open questions.

  2. Module 2

    Import correctly

    CSV quoting, headers, encoding, delimiters, explicit types and file provenance.

  3. Module 3

    Missingness

    Null versus blank versus zero versus unknown; keep the reason and handle each on purpose.

  4. Module 4

    Text and Unicode

    Trim explicit whitespace, normalize permitted forms, preserve names and diagnose invisible characters.

  5. Module 5

    Categories and mappings

    Approved dictionaries, unmatched values, controlled vocabularies and reversible mappings.

  6. Module 6

    Numbers and money

    Locale-aware parsing, exact decimals, units, separate currencies and explicit rounding.

  7. Module 7

    Dates and time

    Date-only values, format ambiguity, offsets, time-zone context and invalid-date quarantine.

  8. Module 8

    Types and identifiers

    Leading zeros, large IDs, booleans, nullable types and lossless serialization.

  9. Module 9

    Duplicates

    Row grain, composite keys, deterministic survivors, provenance and legitimate repeats.

  10. Module 10

    Entity resolution

    Candidate pairs, exact versus fuzzy evidence, false merges and human review.

  11. Module 11

    Validation rules

    Required fields, ranges, allowed categories, cross-field logic, severity and exception reports.

  12. Module 12

    Joins

    Referential integrity, null keys, cardinality checks, orphan rows and duplicated totals.

  13. Module 13

    Combining files

    Schema union, required and optional fields, source lineage and rejected files.

  14. Module 14

    Reshaping

    Pivot collisions, aggregation, unpivoting, and zeros versus absent observations.

  15. Module 15

    Outliers and context

    Flag anomalies without deleting legitimate extremes or silently changing the population.

  16. Module 16

    Reproducible pipelines

    Immutable raw data, idempotent steps, new batches, tests and schema drift.

  17. Module 17

    SQL cleaning

    A declared dialect, CTEs, CASE, trimming, typed casts, window functions and validation queries.

  18. Module 18

    Python and pandas cleaning

    Nullable dtypes, explicit parsing, masks, merge validation and reusable functions.

  19. Module 19

    Analysis readiness

    Train/test leakage, fitted transforms, reconciliation, distribution shift and transparent reports.

  20. Module 20

    Job-ready delivery

    End-to-end projects, trade-off explanations, handoffs, take-home assessments and interviews.