I have a table named df with two columns - Name and Data. The table is something as follows
I am trying to create all possible combinations of values from the Data column and concat the results as separate columns to the existing table. Basically, in every subsequent column, two of the names will take values as 2 and 1.5 and the rest will take the value as 1. I am looking for output as similar to the following table:
Though I have been able to figure out the combination of names that will take the values as 2 and 1.5 in the next column using the following code
for index in list(combinations(df[['Name']].index,2)):
print(df[['Name']].loc[index,:])
print('\n')
However, I am stuck on how to create the fresh columns as mentioned above. Any help on the same is highly appreciated.

