I have one dataframe like this with the first column is the index (i.e., index = [1,2,3]):
1 2 3
1 0 0.43 0.61
2 0.88 0 0.12
3 0.33 0.95 0
The new dataframe should look like the below:
Link Value
1_1 0
1_2 0.43
1_3 0.61
2_1 0.88
2_2 0
2_3 0.12
3_1 0.33
3_2 0.95
3_3 0
Any help is highly appreciated! Thank you!