pandas boolean array calculating the average of two columns based on a filter or a 3rd column code example
Example: pandas boolean array calculating the average of two columns based on a filter or a 3rd column
print(bike_sharing[bike_sharing['workingday']==0][['casual', 'registered']].mean())
print(bike_sharing[bike_sharing['workingday']==1][['casual', 'registered']].mean())