I have df that is similar to the following:
value is_1 is_2 is_3
5 0 1 0
7 0 0 1
4 1 0 0
(it is guaranteed, that the sum of values from columns is_1 ... is_n is equal to 1 calculating by each row)
I need to get the next result:
is_1 is_2 is_3
0 5 0
0 0 7
4 0 0
(I should find the column is_k that is more than 0, and fill it with value from "value" column)
What is the best way to achieve it?