I have a dataset with two columns where I want to separate the second one (delimited by |) into many columns.
id column
1 a|b|a
2 a|b|c|d|e
3 a|c|c
I would like to have columns with the name of each item and its count. for example for user 1 it would be as follows:
id a b c d e
1 2 1 0 0 0
2 1 1 1 1 1
How do I get to separate this data such that the values are distributed in columns as such?