Here is the original df:
area sector item
1 East A <NA>
2 South A Baidu
3 South A Tencent
4 West A <NA>
5 North A <NA>
6 East B Microsoft
7 East B Google
8 East B Facebook
9 South B <NA>
10 West B <NA>
11 North B <NA>
12 East C <NA>
13 South C <NA>
14 West C <NA>
15 North C Alibaba
16 East D <NA>
17 South D <NA>
18 West D Amazon
19 North D <NA>
20 East E <NA>
21 South E <NA>
22 West E <NA>
23 North E <NA>
How can I transform the above df to the following one? Some cells in the transformed df have multiple items from the original df.
Sector East South West North
1 A <NA> "Baidu, Tencent" <NA> <NA>
2 B "Microsoft, Google, Facebook" <NA> <NA> <NA>
3 C <NA> <NA> <NA> "Alibaba"
4 D <NA> <NA> "Amazon" <NA>
5 E <NA> <NA> <NA> <NA>