I have this issue now, I cannot import STL from statsmodels. I've tried to uninstall statsmodels as it was recommended somewhere with a similar issue but it is not possible, at least the way I do it: !pip uninstall statsmodels - NOT working.
ImportError: cannot import name 'STL' from 'statsmodels.tsa.seasonal'
Asked Answered
It seems that the STL function from statsmodels is not included in the latest stable version of the library (0.10.2) but is in the dev version (0.11.0dev0).
You can build and install this specific version with this command: pip install git+https://github.com/statsmodels/statsmodels.git
For this you may need a c compiler if you don't already have one, everything is explained here: https://www.statsmodels.org/dev/install.html#installation-from-source
I've also found this package that seems promising: https://github.com/jrmontag/STLDecompose
This is now in the stable version so just need to pip install --upgrade statsmodels to import the STL class. statsmodels.org/stable/release/version0.11.html –
Microfilm
© 2022 - 2024 — McMap. All rights reserved.