i need to convert it as final result like this
I need the rows name and id with value 1 as according on last 3 columns as shown in the image. It can be done using pandas melt function but i was looking forward to do without using the library.
How can it be done??