See Groupby vs Crosstab too
What it is used for:
How to use:
# Grouping by 'var1'
var1_groups = df.groupby(df['var1']])
# Accessing the group for 'element'
element_var1=var1_groups.get_group(element)
See Groupby vs Crosstab too
# Grouping by 'var1'
var1_groups = df.groupby(df['var1']])
# Accessing the group for 'element'
element_var1=var1_groups.get_group(element)