Which of the following Pandas function checks whether any value is missing or not in the DataFrame?
Which of the following Pandas function checks whether any value is missing or not in the DataFrame?
Solution
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.
Related questions:
2026: 29 May Shift 1
2026: 23 May Shift 1
2026: 18 May Shift 2
2026: 19 May Shift 1
2025: 21 May Shift 1