Hello I have a dataframe such as
COL1 COL2 COL3
1 2 3
3 2 1
2 4 8
3 4 1
and I would like to create a new column where I put for each row the COL name
with the highest value
.
Then I should get:
COL1 COL2 COL3 Newcol
1 2 3 COL3
3 2 1 COL1
2 4 8 COL3
3 4 1 COL2
Does someone have an idea ?