count entrier in columns pandas code example
Example 1: pandas count rows with value
len(df[df['score'] == 1.0])
Example 2: python count variable and put the count in a column of data frame
df['freq'] = df.groupby('myvar')['myvar'].transform('count')