Data Cleaning Exercises

Guide · updated 2026-11-04

How to profile a new dataset before cleaning

What to measure in every column before writing a single rule, and how to turn the profile into questions.

Measure every column

Count rows, missing values, empty strings, values with leading or trailing whitespace, distinct values and the most frequent values. For numbers and dates, record the minimum and maximum. Do this on all rows, not a preview, because rare defects hide in the tail.

Compare with the data dictionary

For each column, check the profile against what the dictionary promises: required fields with blanks, codes outside the allowed list, ids that are not unique. Every mismatch is either a cleaning rule or a question for the data owner.

  • Required but blank
  • More distinct values than allowed
  • Numbers stored as text with padding
  • Ids that repeat

Turn findings into an issue list

Write each finding with its count and an example value. Mark which ones need a decision. This list becomes the plan for your rules and the first part of your handoff note.

Practise it