I'm trying to transform a column containing a list of values to a new set of columns, one for each value over all rows of that column.
For example given :
index cat
0 ['a','b']
1 ['c','a','d']
2 ['e','b','c']
I'd like to get :
index a b c d e
0 1 1 0 0 0
1 1 0 1 1 0
2 0 1 1 0 1
Could you help me and point me in the right direction?Thanks