I have data frame as below
+---+-----------+
|lot|Combination|
+---+-----------+
|A01|A,B,C,D,E,F|
|A01|A,B,C |
|A02|B,C,D,E |
|A03|A,B,D,F |
|A04|A,C,D,E,F |
+---+-----------+
Each of the alphabet is a character separated by comma, I would like to split 'Combination' on each comma and insert the split strings as new column, in binary form. For instance, the desired output will be:
+---+-+-+-+-+-+-+
|lot|A|B|C|D|E|F|
+---+-+-+-+-+-+-+
|A01|1|1|1|1|1|1|
|A01|1|1|1|0|0|0|
|A02|0|1|1|1|1|0|
|A03|1|1|0|1|0|1|
|A04|1|0|1|1|1|1|
+---+-+-+-+-+-+-+
Any help will be appreciated :)