Plot pandas dataframe containing NaNs

后端 未结 4 555
星月不相逢
星月不相逢 2020-12-09 16:23

I have GPS data of ice speed from three different GPS receivers. The data are in a pandas dataframe with an index of julian day (incremental from the start of 2009).

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 16:59

    Given that you want to draw a straight line between the points where you do have data, you can get Pandas to fill in the gaps via interpolation, and then plot:

    .interpolate(method='linear').plot()
    

提交回复
热议问题