If you have a datetime column in your #Python #Pandas data frame, you can groupby on the output of a dt method, such as day_name: df.groupby(df['tpep_pickup_datetime'].dt.day_name())['trip_distance'].mean() The above gives the mean trip_distance for each day.
0 reposts1 like