What is pandas .query() and when is it useful?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks what the pandas DataFrame .query() method does and when it is a better choice than a boolean mask. It tests how query strings refer to columns and Python variables, how they fit into method chains, their performance, and their caveats.