count number of rows with value in pandas code example
Example 1: pandas count rows with value
len(df[df['score'] == 1.0])
Example 2: Returns the number of rows in this DataFrame
# Returns the number of rows in this DataFrame
df.count()
# 2
len(df[df['score'] == 1.0])
# Returns the number of rows in this DataFrame
df.count()
# 2