Pandas: Handling Duplicates & Missing Values

CONCEPTUAL

Given a Pandas DataFrame:

  1. Write a function (or explain the methods) to identify and remove duplicate rows.
  2. Write a function (or explain the methods) to identify and remove rows with missing values (NaNs):
    • in a specific column.
    • if any column has a NaN.
  3. Briefly mention how you might impute (fill) missing values instead of dropping them.

 

 

Nerchuko Academy · Free DS Interview Prep