Heading
Consider my data frame rs123 T C 0 0 1 1 0 0 1 0 0 1 0 0 rs124 T C 0 0 1 0 0 1 0 0 1 0 0 1 rs125 A A 1 0 0 1 0 0 1 0 0 1 0 0
Similarity, i have total 93 columns excluding first three
I want to create my data as
And then transform into new data frame as below
- For first row if 1 is present in column 1 then output should be TT
- For first row if 1 is present in column 2 then output should be TC
- For first row if 1 is present in column 3 then output should be CC
For more detail you can refer below snip
Kindly help me to find solution using python, Its very urgent
Thanks in Advance.