0
df['player_of_match'].value_counts()>15 

i am getting this output

CH Gayle           True
AB de Villiers     True
MS Dhoni           True

                  ... 
BA Bhatt          False
WPUJC Vaas        False
AD Mascarenhas    False

when I am using this code then I am getting :

df['player_of_match'].value_counts()
CH Gayle          21
AB de Villiers    20
MS Dhoni          17
                  ..

BA Bhatt           1
WPUJC Vaas         1
AD Mascarenhas     1

But I just want names having count > 15. Please help me in putting conditions. P.S. new here

rdas
  • 20,604
  • 6
  • 33
  • 46

2 Answers2

1

Try:

df[df['player_of_match'].value_counts()>15] 
mquasar
  • 161
  • 2
  • 6
1

You can try this :

df['player_of_match'].value_counts()[df['player_of_match'].value_counts() > 15]

gustavolq
  • 408
  • 3
  • 10