DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+7 =
Submit