You are viewing documentation about an older version (1.4.0). View latest version

snowflake.snowpark.functions.asc_nulls_last¶

snowflake.snowpark.functions.asc_nulls_last(c: ColumnOrName) → Column[source]¶

Returns a Column expression with values sorted in ascending order (null values sorted after non-null values).

Example:

>>> df = session.create_dataframe([None, 3, 2, 1, None], schema=["a"])
>>> df.sort(asc_nulls_last(df["a"])).collect()
[Row(A=1), Row(A=2), Row(A=3), Row(A=None), Row(A=None)]
Copy