Data Cleaning Exercises

Glossary

Wide and long format

Wide: one column per measurement (Jan, Feb, Mar). Long: one row per measurement with a column naming it.

Pivot turns long into wide; unpivot (melt) turns wide into long. Long format is easier to validate and aggregate; wide format is easier to read. Missing measurements stay missing in both: a cell that was never reported is not 0.

Related: Pivot, Missing value (null)