我具有以下结构的数据
Unique Identifier | Month | Brand|
A | Jan 18 | Nike |
A | Feb 18 | Nike
A | Mar 18 | Reebok
B | Jan 18 | Adidas
B | Feb 18 | Adidas
B | Feb 18 | Adidas
我想进入以下结构:
Unique Identifier | Month | Nike | Reebok | Adidas
A | Jan 18 | 1 | 0 | 0
A | Feb 18 | 1 | 0 | 0
A | Mar 18 | 0 | 1 | 0
B | Jan 18 | 0 | 0 | 1
B | Feb 18 | 0 | 0 | 1
B | Feb 18 | 0 | 0 | 1
我正在寻找什么?如何在熊猫中做到这一点?
谢谢!