Data Cleaning Exercises

Dataset pack

Supplier inventory feed

A supplier feed with impossible quantities, zero prices, malformed numbers and unknown countries.

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 Validate quantities and prices against ranges.

inventory 21 rows × 5 columns

Download inventory.csv

Data dictionary

id
Unique row ID.
sku
Stock-keeping unit, always present.
quantity
Quantity as text; may be missing, malformed or out of range.
unit_price
Price as text; may be missing, malformed, zero or negative.
country
Country code in mixed case and spacing; may be missing or unknown.
idskuquantityunit_pricecountry
"invybqz""SKU-6252""1""760.28"" CA"
"invf1ge""SKU-7738""501""580.05""MX"
"invoi41""SKU-0003""12""-1.00""USA"
"inveree""SKU-5191""23""572.57"" CA"
"inv29z8""SKU-0001""0""0.00""UK"
"invvnhm""SKU-4924""434""524.17""US"

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.