I have a dataset that looks like that:
There are 15 unique values in the column 'query id', so I am trying to create new dataframes for each unique value. I thought of having a loop for every unique value in column 'query id' with a code like this:
df_list = []
i = 0
for x in df['query id'].unique():
df{i} = pd.DataFrame(columns=df.columns)
df_list.append()
i+=1
But I am definitely doing something wrong there and got stuck. Do you have any ideas of how to do that?
Sample dataset:
relevance query id 1 2 3
1 WT04-170 10 40 80
1 WT04-170 20 60 70
1 WT04-176 30 70 50
1 WT04-176 40 90 20
1 WT04-173 50 100 10
