Compare multiple year data on a single plot python

后端 未结 3 1403
甜味超标
甜味超标 2021-01-13 04:13

I have two time series from different years stored in pandas dataframes. For example:

data15 = pd.DataFrame(
    [1,2,3,4,5,6,7,8,9,10,11,12],
    index=pd.d         


        
3条回答
  •  盖世英雄少女心
    2021-01-13 04:58

    You might be able to use pandas.DatetimeIndex.dayofyear to get the day number which will allow you to plot two different year's data on top of one another.

    in: date=pd.datetime('2008-10-31')
    in: date.dayofyear
    out: 305
    

提交回复
热议问题