2019-02-20
阅读量:
1104
'rolling_mean' —报错解决
问题描述:AttributeError: module 'pandas' has no attribute 'rolling_mean' —报错解决
原因: 应该是pandas版本问题,如pandas 0.17.0版本rolling相关模块有,
但是,pandas 0.18.0之后用法改为DataFrame/Series.rolling(window, min_periods=None, freq=None, center=False, win_type=None, axis=0)
解决方法:使用pd.__version__查看我的pandas版本为0.23.0,应使用 pandas.data.rolling()
可以参考https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.DataFrame.rolling.html






评论(0)


暂无数据