DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
compute the average age for each gender? *
In [51]: df.groupby('Gender', as_index=False).Age.mean() Out[51]: Gender Age 0 Female 18 1 Male 15
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#compute
#average
#age
ADD COMMENT
Topic
COMMENT
Name
4+8 =
Submit