Lesson 42 of 60
pythonHandling Missing Values: Imputation Strategies
20 minutes
Course progress70%
Handling Missing Values
Missing data can bias models. Choose an imputation strategy based on the variable type and missingness pattern.
Simple strategies
- Drop rows (
df.dropna()) - Fill with constant (
df.fillna(0)) - Mean/median imputation
- Forward/backward fill (
ffill,bfill)