1. Home
  2. MCQs by exam
  3. NTS

NTS MCQs · Page 136

5,604 multiple choice questions typical of the NTS exam, with answers and explanations. Switch on practice mode to test yourself first.

Showing 3376–3400 of 5,604

What is the difference between df.loc[2] and df.iloc[2]?

  1. Both address the row whose label equals 2
  2. loc works only on columns, iloc only on rows
  3. loc uses the index label 2; iloc uses position 2 Correct answer
  4. loc uses position 2; iloc uses the index label 2
MCQSEXAM Read explanation