🌈 搜索
📅  最后修改于: 2022-03-11 14:45:07.795000             🧑  作者: Mango
df['rolling_mean'] = df.groupby('id')['value'].transform(lambda x: x.rolling(2).mean())