What is the query() method in Pandas, and when would you use it?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks what the pandas query() method does and when it beats a boolean mask for filtering rows. Tests referencing Python variables and awkward column names in the expression, the performance trade-off on large and small frames, and the risks of filtering with string expressions.