Data Cleaning Exercises

Dataset pack

Orders and customer segments

Orders with padded or missing customer keys, and a segment table that includes a row with a missing key.

Fictional data · UTF-8 CSV, every value quoted so padding and leading zeros survive; empty fields are missing values · free for personal and classroom practice · practise it in Join orders to customers without matching blanks.

orders 9 rows × 2 columns

Download orders.csv

Data dictionary

id
Unique order ID.
customer_key
Customer key; may be padded, blank or missing.
idcustomer_key
"oz2w7"∅
"of1nx""C076"
"okyr4"" "
"olohu""C031"
"olfmk""C031"
"okpom"" C021\t"

customers 4 rows × 2 columns

Download customers.csv

Data dictionary

customer_key
Trimmed, unique key; one row has a missing key.
segment
Marketing segment of the customer.
customer_keysegment
∅"UNASSIGNED"
"C031""partner"
"C076""retail"
"C021""online"

Values are shown in quotes so leading and trailing spaces are visible. ∅ means the cell is missing. Exercises are also graded on hidden datasets that are never published.