pandas count values in column with condition code example
Example 1: pandas count rows with value
len(df[df['score'] == 1.0])
Example 2: pandas count values by column
df = pd.DataFrame({'a':list('abssbab')})
df.groupby('a').count()
len(df[df['score'] == 1.0])
df = pd.DataFrame({'a':list('abssbab')})
df.groupby('a').count()