Grouping Data __ Part 2

Let's learn other operations about groups.

Aggregate

In the last lesson, we have shown how to use groupby to split data and aggregate them in each group. The group is calculated by various native pandas functions. However, pandas also provides a universal interface, agg(), which accepts a Numpy function name as a parameter.

In the example below, two different methods are demonstrated.

Get hands-on with 1200+ tech skills courses.