我现在有这个问题,我无法从statsmodels导入STL。我尝试卸载statsmodels,因为建议在类似问题的某个地方进行,但是这是不可能的,至少是我这样做的方式:!pip卸载statsmodels-不起作用。
我有完全相同的问题。到目前为止没有找到解决方案。
似乎来自statsmodels的STL函数未包含在库的最新稳定版本(0.10.2)中,但包含在开发版本(0.11.0dev0)中。
您可以使用以下命令来构建和安装此特定版本:pip install git+https://github.com/statsmodels/statsmodels.git
为此,如果您还没有一个c编译器,则这里将解释所有内容:https://www.statsmodels.org/dev/install.html#installation-from-source
我也发现了这个看起来很有前途的软件包:https://github.com/jrmontag/STLDecompose