STLDecompose
STLDecompose copied to clipboard
Cannot call stldecompose library
Python version: 3.7.* Statsmodel version: statsmodels==0.11.0 Stldecompose version: stldecompose==0.0.5 Error: ImportError: cannot import name '_maybe_get_pandas_wrapper_freq' from 'statsmodels.tsa.filters._utils'
Thanks for the report @seckindinc. I did a bit of commit spelunking and it seems like that util function was removed from the library. For a workaround until a better fix, you could try downgrading your statsmodels version and see if things still work ok.
Thanks for the feedback. I used the same approach and it is working fine now.
On Thu, Jan 30, 2020 at 9:20 PM Josh Montague [email protected] wrote:
Thanks for the report @seckindinc https://github.com/seckindinc. I did a bit of commit spelunking and it seems like that util function was removed from the library. For a workaround until a better fix, you could try downgrading your statsmodels version and see if things still work ok.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jrmontag/STLDecompose/issues/17?email_source=notifications&email_token=AEALN4HRLCGVV2NMHEEIZ43RAMY7RA5CNFSM4KNEGNSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKMNOCY#issuecomment-580441867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEALN4BHNFRVSBF6PZZV7CDRAMY7RANCNFSM4KNEGNSA .
Thanks for the report @seckindinc. I did a bit of commit spelunking and it seems like that util function was removed from the library. For a workaround until a better fix, you could try downgrading your statsmodels version and see if things still work ok.
HI. I have installed version pip install --upgrade stldecompose==0.0.2 still have the same error
Hi @tcabo, I think you'll need to specify an earlier version of statsmodels, not stldecompose
Worked for me, thanks a lot.
Did anyone got solution for this problem ?
install an old version of statsmodel works for me
pip install statsmodels==0.10.2
Thanks! @xchuwenbo it worked for me
Re-opening as reference as described here.
As an additional tip for everyone, I need to use statsmodels 0.11.x to take advantage of some new state space models. There seems to be similar functionality in statsmodels now.
https://www.statsmodels.org/stable/generated/statsmodels.tsa.seasonal.STL.html#statsmodels.tsa.seasonal.STL
I have upgraded to statsmodels 0.12.0 to take advantage of STL functionality, but the stldecompose is not working for me. If I downgrade to statsmodels 0.10.2, then I would not be able to STL functionality. I am using the stldecomose for decompose and forecast. Please advise.
@rahulsharma1208 As is described just above your comment and in other issues, I would advise you to consider the newly added STL functionality in the statsmodels library.
This library was created to fill that functionality gap as it existed many years ago. Preferring an actively maintained library is a more future-proof choice!
Try code below in stl.py file, if you install latest statsmodels.
from statsmodels.tsa.filters._utils import _get_pandas_wrapper
_pandas_wrapper = _get_pandas_wrapper(df)
from statsmodels.tsa.seasonal import seasonal_decompose decomp = seasonal_decompose(df_close, period=365)