snowflake.snowpark.functions.desc¶
- snowflake.snowpark.functions.desc(c: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L5872-L5883)¶
Returns a Column expression with values sorted in descending order.
Example:
>>> df = session.create_dataframe([1, 2, 3, None, None], schema=["a"]) >>> df.sort(desc(df["a"])).collect() [Row(A=3), Row(A=2), Row(A=1), Row(A=None), Row(A=None)]