📖 INDEX
LOADING ENGINE...
df.query()
AI & DATA SCIENCE // df-query
Query the columns of a DataFrame with a boolean expression.
Syntax
res = df.query('A > 5 and B < 10')Examples
Example 01Basic Usage
res = df.query('A > 5 and B < 10')Best Practices
- Use vectorized operations over iterations (e.g.
iterrows()) for performance. - Always verify memory usage when loading large files.