Skip to main contentSkip to solution

During the handling of missing values, in which function we use 'inplace = True' parameter in pandas to make changes in original DataFrame?

Solution

✅ Correct Option: 3

dropna() removes rows or columns containing missing values (NaN). By default it returns a new DataFrame and leaves the original unchanged. Writing df.dropna(inplace=True) makes the change in the original DataFrame and returns None.


Options 1 and 2: dropall() and fillall() are not pandas functions; the real ones are dropna() and fillna().

Option 4: isnull() only returns a True/False DataFrame showing where values are missing. It does not change data and has no inplace parameter.

fillna() also accepts inplace=True, but it is not among the options.

Keyboard Shortcuts

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