简体   繁体   中英

Cannot import RollingOLS: ModuleNotFoundError: No module named 'statsmodels.regression.rolling'

I am running the following command as described by the docs

from statsmodels.regression.rolling import RollingOLS

But it raises the error

ModuleNotFoundError: No module named 'statsmodels.regression.rolling'

How can I solve this problem?

The documentation you linked to is the development version for Statsmodels version 0.11.

As of this post, that has not been released yet. However, there is a release candidate out so it should probably be released in the next few weeks. If you need that feature sooner, you can install the development version from Github.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM