Loading, cleaning and reshaping data

How data is made ready for analysis in code.

1What it covers

How data is made ready for analysis in code. The topic covers reading files and databases, checking types and missing values, removing duplicates, merging tables, reshaping from wide to long form, filtering with stated rules, and the check of row counts and totals after each step. It starts with raw files and ends with a clean table and a record of every change made.

2Why it matters

Most of the time in analysis goes into data preparation. Every step that drops or changes rows must leave a record. A check of totals after each step finds errors while they are small.

3The skill it belongs to

4Roles that use it

Updated 5 Nov 2026