Skip to main contentSkip to solution

Which of the following Pandas function checks whether any value is missing or not in the DataFrame?

Solution

✅ Correct Option: 3

isnull() is the Pandas function that detects missing values. It returns a DataFrame of the same shape with True wherever a value is missing (NaN or None) and False elsewhere. Chaining df.isnull().any() or df.isnull().sum() shows which columns have missing values and how many.

isna() is an alias of isnull() and works the same way.


Option 4: isnan() is a NumPy function (np.isnan), not a Pandas DataFrame method, and it only detects NaN.

Options 1 and 2: isnone() and isfalse() do not exist in Pandas.

Keyboard Shortcuts

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