Data Cleaning Exercises

Glossary

Type inference

A tool guessing column types from the values it reads, for example turning 02139 into the number 2139.

CSV has no types, so readers guess. pandas.read_csv infers numbers and dates by default and can drop leading zeros or misread day/month. Read raw files as text and convert each column with an explicit, validated rule.

Related: Leading zeros, Identifier, Schema