I´m using this code to group observations by hour into a dataframe, I first format the date/time column the way I want.
timedf.columns = pd.to_datetime(timedf