Getting the average of a certain hour on weekdays over several years in a pandas dataframe,"df1.groupby([df1.index.year, df1.index.hour]).mean()"