Match the LIST-I with LIST-II
LIST-I LIST-II A. df.isnull().sum() I. To remove the entire row having the missing value(s) B. df.dropna() II. To find the number of NaN values corresponding to each attribute C. df.fillna(method='pad') III. To replace the missing value by the value after the missing value. D. df.fillna(method='bfill') IV. To replace the missing value by the value before the missing value
Match the LIST-I with LIST-II
| LIST-I | LIST-II | ||
|---|---|---|---|
| A. | df.isnull().sum() | I. | To remove the entire row having the missing value(s) |
| B. | df.dropna() | II. | To find the number of NaN values corresponding to each attribute |
| C. | df.fillna(method='pad') | III. | To replace the missing value by the value after the missing value. |
| D. | df.fillna(method='bfill') | IV. | To replace the missing value by the value before the missing value |
Solution
✅ Correct Option: 2
| List I | List II |
|---|---|
| (A) df.isnull().sum() | (II) To find the number of NaN values corresponding to each attribute |
| (B) df.dropna() | (I) To remove the entire row having the missing value(s) |
| (C) df.fillna(method='pad') | (IV) To replace the missing value by the value before the missing value |
| (D) df.fillna(method='bfill') | (III) To replace the missing value by the value after the missing value |
pad (same as ffill) means forward fill: it carries the previous value forward. bfill means backward fill: it pulls the next value back into the gap.
isnull() gives True/False for each cell, and sum() adds the True values column by column, so it gives the NaN count per attribute.
Related questions:
2025: 22 May Shift 1
2025: 20 May Shift 1
2025: 3 June Shift 2
2025: 21 May Shift 1