Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas boolean array calculating the average of a column based on another column filter

bike_sharing.loc[bike_sharing["workingday"] ==  0, "casual"].mean() 
Source by community.dataquest.io #
 
PREVIOUS NEXT
Tagged: #pandas #boolean #array #calculating #average #column #based #column #filter
ADD COMMENT
Topic
Name
3+9 =