devnotes.

Choosing a Method and Its Impact

Choosing the right strategy

SituationSuggested approach
Under 5% missing, MCARDrop rows or use simple imputation
Numeric column with outliersMedian imputation
Categorical columnMode or an "Unknown" category
Time seriesForward/backward fill or interpolation
Strong correlations between featuresKNN or iterative imputation
Missingness carries meaning (MNAR)Impute and add a missing-indicator
Over 60% missing in a columnConsider dropping the column
Missing target valueDrop the row

Comparing the methods

MethodSpeedKeeps sample sizeUses other columnsRisk
Drop rowsFastNoNoBias, data loss
Mean / median / modeFastYesNoReduced variance
Forward / backward fillFastYesNoWrong if gaps are long
InterpolationFastYesNoAssumes a pattern
KNN / IterativeSlowerYesYesComplexity, overfitting

Impact of handling missing values well

  • Improved data quality — a cleaner dataset is more reliable for analysis and training.
  • Better model performance — models train on complete data and predict more accurately.
  • Preserved data integrity — consistent, well-documented values for later analysis.
  • Reduced bias — patterns reflect reality more closely.

Golden rules

  1. First find out why the data is missing.
  2. Convert placeholders like -999 to NaN before anything else.
  3. Learn imputation values from the training set only to avoid leakage.
  4. Put the imputer inside a Pipeline.
  5. Document what you did and why.
Choosing a Method and Its Impact - Missing Values | Data Preparation | DevNotes