I have this code that assigns each time different set from the list in the train and test set. I am struggling to understand the code.
df_list = [df1, df2, df3, df4, df5, df6]
for i in range(6):
train = pd.concat(df_list[0:i] + df_list[i+1:])
test = df_list[i]
Does it say that it goes from df1[0]
all the way until df6[5]
and add to this every time one df
?
Can you please help me to understanding the code?