AttributeError: module ‘pandas’ has no attribute ‘rolling_mean’
moving_avg = pd.rolling_mean(ts_log,12)
上面代码报错:AttributeError: module ‘pandas’ has no attribute ‘rolling_mean’
解决方法:
moving_avg = ts_log.rolling(12).mean()
参考:https://stackoom.com/question/3Pou4/%E6%A8%A1%E5%9D%97-pandas-%E6%B2%A1%E6%9C%89%E5%B1%9E%E6%80%A7-rolling-mean