I have a dataframe which contains single column but multiple values in the row . I need to transpose and append the data correctly from each row.
The dataframe is as follows:
l1 l2
0 a:1
b:2
c:3
1 a:11
b:12
c:13
2 a:21
b:22
c:33
The column name l1 is the index column and column named l2 contains the parameter name and value .I need to consider the l2 column and arrange the dataframe as the desired output.
The desired output is as follows:
a b c
1 2 3
11 12 13
21 22 33
The code which I have tried is of transposing .
df1=df.T
But It should Transpose each row value to the columns.