What is the difference between .loc and .iloc in pandas?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks for the difference between the pandas .loc and .iloc indexers. Tests whether you know how each one finds rows and columns, how slice endpoints behave, which selectors each accepts, and why the two can disagree on a DataFrame with an integer index.