count number of rows that satisfy a condition in pandas code example Example: pandas count rows with value len(df[df['score'] == 1.0])