January 2020
Beginner to intermediate
432 pages
11h 24m
English
After downloading the data in Step 2, we made sure that the series only contained one data point per month (we enforced this by resampling the data to monthly frequency). To calculate the rolling statistics, we used the rolling method of a pandas DataFrame and specified the desired window size (12 months).
We used the seasonal_decompose function from the statsmodels library to carry out the classical decomposition. When doing so, we indicated what kind of model we would like to use—the possible values are additive and multiplicative.
Read now
Unlock full access