Rolling Call на одну колонку и Groupby Second Pandas

df['rolling_mean'] = df.groupby('id')['value'].transform(lambda x: x.rolling(2).mean())
Horrible Hoopoe