I have a dataframe that looks like the following:
Prod Quan Comp
X10 100 A1
X10 100 A2
X10 100 A3
B10 10 A1
B10 10 A2
I'd like to pivot it to the following:
Prod Quan Uname1 Uname2 Uname3
X10 100 A1 A2 A3
B10 10 A1 A2 Nan
I tried pivot, tranpose and couldn't get any idea how to do that
Any suggestion will be highly appreciated