AI engineering glossary · NumPy pandas visualization

What is query?

query: A pandas method that filters rows using a condition written as a string, such as 'age > 30 and city == "Pune"'. It can be shorter and easier to read than Boolean indexing, especially inside method chains.

Level: intermediateTopic: NumPy pandas visualization

query: an example

df.query('sales > 1000 and city == "Pune"') keeps Pune rows with sales above 1000.

Related terms

More NumPy pandas visualization terms

Where you learn it

query is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.