Data Cleaning Exercises

Guide · updated 2026-11-04

Validation rules and exception reports

Ordering rules, choosing severities and producing an exception report people can act on.

Write rules with outcomes

Each rule names the column, the condition and what happens to failures: quarantine, set to missing, or stop. Include required fields, types, ranges, allowed values and cross-field checks.

Order matters

A row can fail several rules. Check them in a declared order and record the first failure, so the report is reproducible.

Make exceptions useful

Report counts per reason, an example per reason and who can fix it. Make sure input rows equal clean rows plus exceptions.

Practise it