Пандас прокатный список
df['C'] = [window.to_list() for window in df.B.rolling(window=3)]
Angry Alpaca
df['C'] = [window.to_list() for window in df.B.rolling(window=3)]