menu_book Course Curriculum (Pandas) expand_more
Series & DataFrames
Selection & Filtering
Cleaning Data
Grouping & Aggregation
Joining & Reshaping
Time Series & I/O
multiple aggregations with agg()
Learn multiple aggregations with agg() in Pandas with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Intermediate
pandas-026.py
python
import pandas as pd
df=pd.DataFrame({'dept':['IT','IT','HR'],'salary':[100,120,80]})
print(df.groupby('dept').salary.agg(['count','mean','max']))
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content