0

I have a dataframe like below

no  out
20  True
3   False
3   False

How to get the counts of True and False

df.groupby(['out']).agg({'out':sum})



         out
out 
False   0.0
True    26.0

I am getting False count as 0

theletz
  • 1,713
  • 2
  • 16
  • 22

1 Answers1

0

Try:

df.groupby(['out'])['out'].count()
theletz
  • 1,713
  • 2
  • 16
  • 22