Pandas groupby to find percent True and False
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Popsicle Puzzles
--
Chapters
00:00 Question
00:53 Accepted answer (Score 14)
01:07 Thank you
--
Full question
https://stackoverflow.com/questions/3031...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #python27 #pandas
#avk47
    --
Music by Eric Matyas
https://www.soundimage.org
Track title: Popsicle Puzzles
--
Chapters
00:00 Question
00:53 Accepted answer (Score 14)
01:07 Thank you
--
Full question
https://stackoverflow.com/questions/3031...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #python27 #pandas
#avk47
ACCEPTED ANSWER
Score 15
Something like this:
In [13]: g = df.groupby('SITE')['VALUE'].mean()
In [14]: g[g > 0.1]
Out[14]: 
SITE
Canada    0.5
USA       1.0