Skip to main contentSkip to solution

fillna(num) function is used in pandas for:-

Solution

✅ Correct Option: 1

fillna(num) replaces every missing value (NaN) in a Series or DataFrame with the value passed as the argument. For example, df.fillna(5) fills all NaN entries with 5.


Option 2: 0 is used only when you call fillna(0). It is not the default.

Option 3: NaN is the missing value itself, so filling with NaN changes nothing.

Option 4: the column average is not used automatically. You must pass it yourself, for example df['A'].fillna(df['A'].mean()).

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question