snowflake.snowpark.functions.asc_nulls_last¶
- snowflake.snowpark.functions.asc_nulls_last(c: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L7175-L7195)¶
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)]