Daftar Pandas Rolling

df['C'] = [window.to_list() for window in df.B.rolling(window=3)]
Angry Alpaca