Real-world data is messy, missing values are common.
Here's how to handle them cleanly:
# Check for nulls
df.isnull().sum()
# Drop rows with any missing values
df_clean = df.dropna()
# Fill missing values
df['age'].fillna(df['age'].median(), inplace=True)
df['category'].fillna('Unknown', inplace=True)
# Forward or backward fill (great for time series)
df['value'].ffill()
Next up 👉 Using GroupBy
