Which function is used for dropping the entire row (object) having the missing values?
Which function is used for dropping the entire row (object) having the missing values?
Solution
✅ Correct Option: 1
df.dropna() removes every row that contains at least one missing value (NaN) from a pandas DataFrame. By default it works on rows (axis=0), so a row with any NaN is dropped completely.
Option 2: df.drop() removes rows or columns by label or index, and it does not look at missing values.
Options 3 and 4: removena() and na() are not pandas DataFrame methods.
Use df.dropna(axis=1) to drop columns with missing values instead.
Related questions:
2025: 27 May Shift 2
2026: 26 May Shift 1
2025: 13 May Shift 2