使用这句代码: temp = pd.rolling_mean(temp, 2) 会报以下错误:
AttributeError: module ‘pandas’ has no attribute ‘rolling_mean’
解决方法:
将代码改为:temp = temp .rolling(2).mean()
版权声明:本文为CSDN博主「清晨的光明」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/kdongyi/article/details/83383648
#OBV_ma = pd.Series(pd.rolling_mean(OBV, n), name = xnam)
OBV_ma = pd.Series(OBV.rolling(n).mean(), name = xnam)