Is there a way to optimize the code below ?
data, train_data are dataframe data has almost 1M rows
timesteps = 20
for i in range (0, len(data)):
for j in range (0, timesteps):
train_data = train_data.append(data.iloc[i], ignore_index=True)