Skip to main contentSkip to solution

Match the LIST-I with LIST-II

LIST-ILIST-II
A.df.loc['Science']I.Merging
B.df.loc['Maths']>90II.Slicing
C.df.loc['Maths':'Science']III.Boolean Indexing
D.df1=df1.append(df2)IV.Label based indexing

Solution

✅ Correct Option: 2
List IList II
(A) df.loc['Science'](IV) Label based indexing
(B) df.loc['Maths']>90(III) Boolean Indexing
(C) df.loc['Maths':'Science'](II) Slicing
(D) df1=df1.append(df2)(I) Merging

A single label inside loc picks out one row by its name, so it is label based indexing.

A comparison such as >90 returns True/False values, which is what Boolean indexing uses.

With loc, a range like 'Maths':'Science' includes both end labels, unlike normal Python slicing.

Keyboard Shortcuts

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