0PricingLogin
Data Science Academy · Lesson

Drop vs Fill: Choosing Wisely

When to remove and when to impute.

Two Roads at a Gap

When you meet missing data, you face one big choice: drop the affected rows, or fill them in. The right road depends on how much you lose either way. 🛣️

Dropping Rows

The method dropna() removes any row that has at least one missing value. It is clean and simple, but it can quietly delete a lot of data.

clean = df.dropna()

All lessons in this course

  1. Find the NaNs Hiding in Your Table
  2. Drop vs Fill: Choosing Wisely
  3. Impute With Mean, Median, or Mode
  4. Fix dtypes and Duplicate Rows
← Back to Data Science Academy