Input Df:
ID Values
1 1;6;7
2 1;6;7
3 5;7
4 1;5;9;10;2;3
Expected df
ID 1 2 3 4 5 6 7 8 9 10
1 1 0 0 0 0 1 1 0 0 0
2 1 0 0 0 0 1 1 0 0 0
3 0 0 0 0 1 0 1 0 0 0
4 1 1 1 0 1 0 0 0 1 1
Problem Statement:
I have a column Values
which has colon separated values. I now want to make these values as column names and fill those column values with 1 ,0 .
Example: ID 1 has 1;6;7 so ID 1 has 1
in column 1 ,6 and & and rest is 0
I couldn't find any solution which could achieve this?