Here is an example of my DataFrame
user workflow device location date
A top Mac SF 1/1/19
B left Win SA 1/1/19
A right Mac SF 1/5/19
C left iphone LA 1/7/19
D left pixel BO 1/20/19
C bottom iphone LA 1/21/19
I want to transform the DF to look like this:
User top bottom left right Mac Win iphone pixel SF SA LA BO
A 1 0 0 1 1 0 0 0 2 0 0 0
B 0 0 1 0 0 1 0 0 0 1 0 0
C 0 1 1 0 0 0 2 0 0 0 2 0
D 0 0 1 0 0 0 0 1 0 0 0 1
How would one do that using Pandas?