FOMO Daily
Feed
Lerner Consulting Blogยท

Pandas groupby: Multiple columns and multiple aggregation methods

Data EngineeringPythonpandasAggregation

TL;DR

Pandas can group data by multiple categorical columns and apply multiple aggregation methods at once. Grouping by passenger_count and VendorID and calculating mean and standard deviation produces a DataFrame with two result columns and a two-level index.

Read the original post Sign in to mark as read or skip