Suppose now I have the following pandas data frame:
id text
1 A B C
2 B D
3 A D
And I want to get the following result:
id A B C D
1 1 1 1 0
2 0 1 0 1
3 1 0 0 1
I don't how to describe this transformation, it looks like one-hot encoding but they should be totally different.
Anyone knows how to do this transformation and what's the name of such transformation?