snowflake.snowpark.functions.greatest_ignore_nulls¶
- snowflake.snowpark.functions.greatest_ignore_nulls(*columns: Union[snowflake.snowpark.column.Column, str]) Column [source]¶
Returns the largest value from a list of expressions, ignoring None values. If all argument values are None, the result is None.
- Parameters:
columns (ColumnOrName) – The name strings to compare.
- Returns:
The greatest value, ignoring None values.
- Return type:
Examples:
>>> df = session.create_dataframe([[1, 2, 3, 4.25], [2, 4, -1, None], [3, 6, None, -2.75]], schema=["a", "b", "c", "d"]) >>> df.select(greatest_ignore_nulls(df["a"], df["b"], df["c"], df["d"]).alias("greatest_ignore_nulls")).collect() [Row(GREATEST_IGNORE_NULLS=4.25), Row(GREATEST_IGNORE_NULLS=4.0), Row(GREATEST_IGNORE_NULLS=6.0)]