Skip to content
Back to course

6.4 Data Cleaning

Raw data is messy: missing values, duplicates, typos, and wrong formats are everywhere. Data cleaning is the work of fixing these problems so the data is accurate and consistent.

Imagine a phone-number list where some entries are '0911...', some '+2519...', and some are blank. Cleaning means making them one consistent format and deciding what to do with the blanks.

A clinic merges two patient lists and finds the same person twice — once as 'Abebe T.' and once as 'Abebe Tadesse.' Cleaning removes the duplicate so the count is correct.

Scenario

A dataset has an 'age' column where 5% of rows are blank. What is a reasonable cleaning step?

Check your understanding

1/4 · 40 XP

'Garbage in, garbage out' means a great model cannot fix dirty data.