I have this dataframe:
CLAIM CODE
a 1
a 2
a 3
b 1
b 2
c 3
And i want this dataframe:
CLAIM CODE1 CODE2 CODE3
a 1 1 1
b 1 1 0
c 0 0 1
one-hot encoding either encodes the both columns or removes the encoded column from the original dataset. I've also tried spread() but it doesn't quite get me all the way to my target dataframe