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

snowflake.snowpark.functions.asc

snowflake.snowpark.functions.asc(c: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L5831-L5841)

Returns a Column expression with values sorted in ascending order.

Example:

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