I'm preparing data for multilabel classification and I want to transform text categories into zeros/ones vector.
Example input (dataframe):
['a']
['b']
['e', 'd']
['a', 'g', 'x']
etc. example output:
[1 0 0 0 0 0 0 ... 0]
[0 1 0 0 0 0 0 ... 0]
[0 0 0 1 1 0 0 ... 0]
[1 0 0 0 0 0 1 ... 0]
etc.
There's 200 categories. I haven't found how to do it when you have to deal with multilabel classification. Any help would be appreciated.