This is a part of data frame I have:
index value category
1 ff a
2 ss a
3 hl a
4 dn a
5 fs b
6 lm b
7 fds b
8 dn b
9 hs b
10 ho c
11 ycs c
12 dl c
I want to convert it to this format:
a b c
ff fs ho
ss lm ycs
hl fds dl
dn dn
hs
I know that I can filter the data based on a category and create a new data frame by adding a value of each category as column. Is there any simpler way? I tried stacking methods but they did not work.