Have been working with time series in Python, and using sm.tsa.seasonal_decompose
. In the docs they introduce the function like this:
We added a naive seasonal decomposition tool in the same vein as R’s
decompose
.
Here is a copy of the code from the docs and its output:
import statsmodels.api as sm
dta = sm.datasets.co2.load_pandas().data
# deal with missing values. see issue
dta.co2.interpolate(inplace=True)
res = sm.tsa.seasonal_decompose(dta.co2)
res.plot()
They say it is naive but there is no disclaimer about what is wrong with it. Does anyone know?
decompose
is also "naive" and if and when it is ever necessary to go fancy. Get the impression given that.seasonal_decompose
worked on my data that it's probably all you typically need. – Vinnie