Diagnose and handle missing data with pandas
8 steps · about 3 h 45 min · Intermediate
- Recognise pandas missing-value representations (guide, pandas documentation, 40 min)
Different dtypes represent absence differently, which affects comparisons, arithmetic and conversion.
- Map missingness by row and column (reference, pandas documentation, 20 min)
A Boolean mask is the basis for counts, rates and patterns of absent values.
- Compare simple and multivariate imputation (guide, scikit-learn developers, 40 min)
Learn what each method assumes before replacing values that were never observed.
- Delete incomplete records deliberately (reference, pandas documentation, 20 min)
Control axes and thresholds so deletion follows a documented rule rather than convenience.
- Fill values with an explicit mapping (reference, pandas documentation, 20 min)
Column-specific values avoid applying one meaningless replacement across unlike variables.
- Measure imputation effects on a model (guide, scikit-learn developers, 35 min)
Compare strategies through downstream validation rather than assuming the most complex method wins.
- Preserve a missingness signal (guide, scikit-learn developers, 20 min)
An indicator can capture information in the fact that a measurement was absent.
- Fit imputation inside the validation pipeline (guide, scikit-learn developers, 30 min)
Learning replacement values from the full dataset leaks information into evaluation.