Data Cleaning Exercises

Guide · updated 2026-11-04

Identifiers, leading zeros and long ids

Why codes are text, and how to keep them intact through every tool.

Identifiers are labels

Postcodes, account numbers and member ids name things. Arithmetic on them is meaningless, and converting them to numbers drops leading zeros.

Long ids lose digits

Floating point keeps about 15–17 significant digits. An 18-digit id stored as a float can change. Spreadsheets display such ids in scientific notation and save them that way.

Keep them as text end to end

Read ids as text, compare them exactly, and only trim them when a rule says so.

Practise it