snowflake.snowpark.functions.least¶
- snowflake.snowpark.functions.least(*columns: ColumnOrName) Column [source]¶
Returns the smallest value from a list of expressions. If any of the argument values is NULL, the result is NULL. LEAST supports all data types, including VARIANT.
Example:
>>> df = session.create_dataframe([[1, 2, 3], [2, 4, -1], [3, 6, None]], schema=["a", "b", "c"]) >>> df.select(least(df["a"], df["b"], df["c"]).alias("least")).collect() [Row(LEAST=1), Row(LEAST=-1), Row(LEAST=None)]