train_data_blocks = []
train_labels = []
block_size = 15
for i in range(len(data) - block_size - 1):
train_data_block = data.iloc[i:i+block_size].values
train_label = data.iloc[i+block_size].values
train_data_blocks.append(train_data_block)
train_labels.append(train_label)
train_data = np.array(train_data_blocks)
train_labels = np.array(train_labels)