From the course: Practical Python for Time Series Analysis
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Fill missing data with linear interpolation - Python Tutorial
From the course: Practical Python for Time Series Analysis
Fill missing data with linear interpolation
- [Instructor] In this chart, we visualize both timeseries indicators continuously without removing any data point as we had before because of the inner join. To maintain the full data, we must interpolate the time series so that the periods for which we have missing data can be joined on a linear progression, filling the numbers in the middle. To do so, we access the function interpolate, whose most important parameter is the methods. To learn which other methods you have available, you observe linear, time, index, pad, nearest, et cetera. In our case, we will use method equals linear, save it back into the variable and visualize the latest 20 data points that are now fields where previously we had missing data. For example, if you take a look at 25th June the first for the mortgage rate, we had previously missing data points, and down below, we've got 6.87, which is the average, equally spaced between the previous dates…
Contents
-
-
-
(Locked)
Combine multiple time series datasets2m 34s
-
(Locked)
Download and load FRED data4m 54s
-
(Locked)
Concatenate time series with pandas.concat()4m 37s
-
(Locked)
Inner join vs. outer join1m 49s
-
(Locked)
Fill missing data with linear interpolation2m 13s
-
(Locked)
Automate loading with for loops3m 34s
-
(Locked)
Rename columns and export data4m 39s
-
(Locked)
-
-
-
-
-
-
-
-
-
-