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
答案 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()