spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kushagra deep <kushagra94d...@gmail.com>
Subject Max of multiple columns of a row in spark
Date Sun, 06 Jun 2021 21:13:57 GMT
Hi Guys,

I have a problem where I have a df as below:

===================+
Marks1 | Marks2| Marks3 |
  10.         30.          40.     |

I want to add a new column in the df with name Max with the max of the
values of the three columns.

The resultant df should be :

=======================+
Marks1| Marks2| Marks3 | Max |
 10.         30.         40.       40

Thanks In Advance

Reg,
Kushagra Deep

Mime
View raw message