pd.concat([df.iloc[:, 0:4].shift(-i) for i in range(window_size)] + [df.
    iloc[:, (4)].shift(1 - window_size)], axis=1).iloc[0:1 - window_size]
How to concatenate multiple shifted rows of a dataframe side by side?