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.
Automate loading with for loops - Python Tutorial
From the course: Practical Python for Time Series Analysis
Automate loading with for loops
- [Instructor] This time, we'll visualize more than two time series data files in the same chart as we observe in the data folder. But in this video, we'll go beyond because we will iterate using a for loop, automating the process for seamless loading of multiple datasets. The concat function needs a list of multiple time series data frames for which we have repeated the same code, just changing the path. We must identify which is the thing that is changing every single time, and that is the path. So at the beginning, we will use a list of paths. Now, we iterate for each path to become the ones that we have in the list. And inside the for loop, we want to save it into the data frame by reading the CSV and storing it into an empty list that we must define at the beginning with the data frames. Because that list will accumulate all of the data frames processed, having the date time column as the index, and parsing the…
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)
-
-
-
-
-
-
-
-
-
-