0
votes

I am working with time series with missing data. The time series is only ascending. It is hourly time series.

I woud like to interpolate the missing data in taking account the past values. The interpolation shouldn't be linear.

I am working with Python and Pandas. I used the following method:

data.interpolate(method="time",limit_area="inside")

This is the result applied to one of my time series:

enter image description here

The interpolation is in blue. However, we can see it is linear which is not what I expect. I tried to resample hourly data to daily data but still it doesn't work.

Is there another method which can interpolate missing data in a time series taking account the past values (past trend)?

Thank you.

1
There is a large number of different interpolation algorithms, which might differ dramatically. Your data appears to be far from smooth, which leads me to believe that obtaining a good approximation of the actual curve is going to be difficult.Hagadol

1 Answers

0
votes

Have you tried polynomial interpolation? Don't forget to sort by date before you do that.

data.interpolate(method='polynomial', order=2)

See Link for more references