How do you filter DataFrame rows efficiently in pandas with a single condition versus multiple conditions?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how to filter rows of a pandas DataFrame with one condition and with several combined conditions, and how to keep it fast. Tests boolean masks, operator precedence, helpers such as isin, between and query, and how missing values change which rows a filter keeps.