What is the difference between loc and iloc in pandas in Python?
Correct answer
D. loc selects by label; iloc selects by integer position
5 views
D. loc selects by label; iloc selects by integer position
5 views
loc uses labels, iloc uses integer positions.
Asked in: Python Interview Data Libraries
https://docs.python.org/3/library/index.htmlNot sure why the answer is D? Ask here and get an explanation.