I have a dataframe like this
age col1 col2 col3 max
--------------------------------------
0 200 150 350
16 68 250 50
I want to find max value between col1, col2, col3 for every row and update the last column "max" with the column name of the max value
Example in first row, the max value is 350 the "max" column value will be "col3" result like this:
age col1 col2 col3 max
------------------------------------------
0 200 150 350 col3
16 68 250 50 col2
How can I do this?