AI engineering glossary · NumPy pandas visualization

What is agg?

agg (also called aggregate, named aggregation): A pandas method that computes one or more summary statistics for each group or column, such as sum, mean or a custom function. Named output lets you label the output columns, giving a compact and readable summary table.

Level: intermediateTopic: NumPy pandas visualization

agg: an example

df.groupby('city').agg(total=('sales', 'sum'), orders=('id', 'count')) returns each city's total sales and order count.

Related terms

More NumPy pandas visualization terms

Where you learn it

agg 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.