retrun a Series
, to get row counts per group is by calling .size()
:
df.groupby(['col_name']).size()
retrun a DataFrame
(instead of a Series
) :
df.groupby(['col_name']).size
retrun a Series
, to get row counts per group is by calling .size()
:
df.groupby(['col_name']).size()
retrun a DataFrame
(instead of a Series
) :
df.groupby(['col_name']).size