I have a dataframe like this:
V1 V2 V3
0.4 -0.9 0.6
0.8 -0.2 0.4
-0.6 0.1 0.8
I want to get the maximum value (sign doesn't matter) and print the name of the column with the highest value in a column in the end.
I want to have this:
V1 V2 V3 MAX
0.4 -0.9 0.6 V2
0.8 -0.2 0.4 V1
-0.6 0.1 0.8 V3
Any ideas?