LernerPython blog, from Reuven... Note

LernerPython blog, from Reuven Lerner: Pandas groupby: Aggregating multiple columns with multiple functions

Does Python Pandas allow multiple data columns and multiple methods?Yes!df.groupby('passenger_count')[['trip_distance', 'total_amount']].agg(['mean', 'std'])The above returns a data frame. Its 4 columns are a 2-level multi-index with mean/std in the inner level.
CdXz5zHNQW_SH2qLnYdGP.png