Cleaning & transforming data

Data cleaning

Whitespace, text-as-numbers, blank rows, duplicates and columns that need splitting.

A column where one customer appears as " Acme ", "ACME", "acme ltd" and "Acme" — whitespace and case that must be normalised before counting.A column where one customer appears as " Acme ", "ACME", "acme ltd" and "Acme" — whitespace and case that must be normalised before counting.the same value, written four waysAB1CustomerAmount2 Acme 1203ACME804acme455Globex1,200strip · loweracmeone customertotal 245

Start with the full guides

The long-form treatment of data cleaning, with the reasoning the shorter pages assume.

Step-by-step how-tos

One task each, with code you can copy, run and adapt.

Compare the options

Which tool or approach to pick, and why.

When it breaks

The errors this topic produces, with the cause explained rather than just the fix.

Follow it through a track

Prefer an ordered route? These tracks cover data cleaning along the way, in the order that builds on itself.

Related topics

Subjects that keep turning up on the same pages as this one, most overlap first.

Data cleaning is part of Cleaning & transforming data.