Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas groupby counts

df[['col1', 'col2', 'col3', 'col4']].groupby(['col1', 'col2']).agg(['mean', 'count'])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #groupby #counts
ADD COMMENT
Topic
Name
6+3 =