pyspark.sql.functions.array_min¶
-
pyspark.sql.functions.
array_min
(col: ColumnOrName) → pyspark.sql.column.Column¶ Collection function: returns the minimum value of the array.
- Parameters
- col
Column
or str name of column or expression
- col
Examples
>>> df = spark.createDataFrame([([2, 1, 3],), ([None, 10, -1],)], ['data']) >>> df.select(array_min(df.data).alias('min')).collect() [Row(min=1), Row(min=-1)]