Hi, I have a following problem. I would like to define new data frames using a for loop. I have a big dataframe df that contains values from all 6 rounds. I need to have df1, df2, df3, ... ,df6 that will contain only values from round 1, 2, .., 6 respectively.
I tried this:
I tried this:
x = {} for i in range(1, 6): x[i] = df.loc[df['round'] == i] name = "df" + str(i) print(name) name = x[i]I got a dictionary X that contains 6 dataframes. But how can I upload them into my environment and name them df1, df2, df3, ... ,df6 ? Thanks a lot!