Python Pandas Groupby function agg Series GroupbyObject
Group By FunctionThis is a quick look at Python groupby function. Very powerful and useful function. We will take a simple look at it here. Credits to Data School , creator of Python course materials. lets import sample dataset In [18]:
|
1 |
import pandas as pd |
In [19]:
|
1 |
drinks = pd.read_csv('http://bit.ly/drinksbycountry') |
In [20]:
|
1 2 |
#lets check the head drinks.head() |
Out[20]: country beer_servings spirit_servings wine_servings total_litres_of_pure_alcohol continent…
