A common task in data cleaning is managing "NaN" (Not a number) values. Which…

2026

A common task in data cleaning is managing "NaN" (Not a number) values. Which Pandas function allows you to replace all missing values in a DataFrame with a specific value, such as 0?

Answer: C. df.fillna()

  1. A.

    df.dropna()

  2. B.

    df.isna()

  3. C.

    df.fillna()

  4. D.

    df.replace_nan()

Attempted by 188 students.

Show answer & explanation

Correct answer: C

Explore the full course: Bpsc

Loading lesson…