PySpark SQL Functions | least method
Start your free 7-days trial now!
PySpark SQL Functions'
least(~) takes as input multiple columns, and returns a PySpark Column holding the least value for every row of the input columns.
The input columns whose row values will be compared to check.
A PySpark DataFrame.
Consider the following PySpark DataFrame:
Getting the least value for every row of specified columns in PySpark
To get the least value for every row of columns
We can also pass
Column objects instead of column labels:
Note that we can append the
Column returned by
least(~) by using