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

snowflake.snowpark.functions.asc¶

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

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