AttributeError:模块“ pandas”没有属性“ rolling_mean” [temp.append]

时间:2019-02-28 03:11:37

标签: python python-3.x

temp.append(pd.rolling_mean(pd.pivot_table(telemetry,
   index='datetime',
   columns='machineID',
   values=col), window=24).resample('3H',
        closed='left',
        label='right',
        how='first').unstack())

os:windows10 python3.7.1 康达4.6.7

1 个答案:

答案 0 :(得分:0)

检查https://pandas.pydata.org/pandas-docs/version/0.23.0/whatsnew.html

FutureWarning: pd.rolling_mean is deprecated for DataFrame and will be removed in a future version, replace with
                       DataFrame.rolling(window=3,center=False).mean()