Skip to main contentSkip to solution

Match the LIST-I with LIST-II

LIST-ILIST-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 IList 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.

Keyboard Shortcuts

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