How would you iterate over rows in a DataFrame, and what's the difference between iterrows() and itertuples()?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how to loop over the rows of a pandas DataFrame and how iterrows() and itertuples() differ. It tests what each method returns per row, how that choice affects speed and column dtypes, and when a vectorized operation should replace the loop entirely.