🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: pandas Basics: all 10 questions

Quiz: pandas Basics · Question 1 of 10

What is the difference between loc and iloc?

What is the difference between loc and iloc?

  1. A.loc selects by labels; iloc selects by integer positions
  2. B.loc is for rows, iloc for columns
  3. C.iloc is faster but loc is deprecated
  4. D.There is no difference
Answer & explanation

Correct answer: loc selects by labels; iloc selects by integer positions

They only look alike with a default 0, 1, 2… index.

Can you get the rest right without peeking?

Take the timed Quiz: pandas Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →