Reputation: 899
I have a pandas dataframe as below
(Year index is int64, Total_Population_Final is float.)
I want to create a linear interpolation (and extrapolation), but using pd.interpolate() I only seem to be able to create an interpolation between the two years (not extending it forward and backward in time).
Upvotes: 2
Views: 2325
Reputation: 899
Update: I have solved this (for anyone interested for future reference), using:
pd.interpolate(method="spline", order=1, limit_direction="both")
Upvotes: 2