row_ids = [list(range(k, k + 3)) for k in range(x.shape[0] - 2)]
new_data = np.reshape(data[(row_ids), :], [data.shape[0] - 2, 12])
new_labels = labels[2:]
How to concatenate multiple shifted rows of a dataframe side by side?