Missing values in Time Series in python

后端 未结 4 1731
暗喜
暗喜 2021-02-07 20:42

I have a time series dataframe, the dataframe is quite big and contain some missing values in the 2 columns(\'Humidity\' and \'Pressure\'). I would like to impute this missing v

4条回答
  •  遥遥无期
    2021-02-07 21:18

    Looks like your data is by hour. How about just take the average of the hour before and the hour after? Or change the window size to 2, meaning the average of two hours before and after?

    Imputing using other variables can be expensive and you should only consider those methods if the dummy methods do not work well (e.g. introducing too much noise).

提交回复
热议问题