Box plot of hourly data in Time Series Python

后端 未结 2 404
逝去的感伤
逝去的感伤 2021-01-27 08:06

How to group by a given frequency let say Hourly, and create a set of box plot for one column in a time series data set ?

range = pd.date_range(\'2015-01-01\',          


        
2条回答
  •  醉梦人生
    2021-01-27 08:39

    IIUC, you need, which gives you a box of speed during each hour of the a day:

    #You need to reshape your dataframe with hours as column headers
    df.set_index(df.index.hour, append=True)['speed'].unstack().plot.box()
    

    Output:

提交回复
热议问题