I have a data frame which looks like this:
Salesman Height product value
Knut 6 voltage 5
Knut 6 frequency 1
Knut 6 speed 3
Knut 3 voltage 3
Knut 3 frequency 5
Knut 3 speed 3
Steve 6 frequency 2
Steve 6 voltage 2
I want to reshape it so that it looks like this:
Salesman Height voltage frequency speed
Knut 6 5 1 3
Knut 3 3 5 3
Steve 6 2 2 NA
For every "salesman" and "height" combination, each value of the column "product" should be changed as a column and would hold the value from the column value. If the value doesn't exist NA should be the placeholder.
This is my first time with panda and pretty much stuck with it. Looked into reshaping and pivot but couldn't get any result.