1day['hour'] = day['date_time'].dt.hour
2bussiness_days = day.copy()[day['dayofweek'] <= 4] # 4 == Friday
3weekend = day.copy()[day['dayofweek'] >= 5] # 5 == Saturday
4by_hour_business = bussiness_days.groupby('hour').mean()
5by_hour_weekend = weekend.groupby('hour').mean()
6
7print(by_hour_business['traffic_volume'])
8print(by_hour_weekend['traffic_volume'])