desc | Teradata Package for Python - desc - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

Use the desc() function to generate a new ColumnExpression which sorts the actual expression in descending order.

  • This function is supported only while sorting data.
  • This function is neither supported in projection nor supported in filtering data.

Example

>>> from teradataml import load_example_data
>>> load_example_data("dataframe","sales")
>>> df = DataFrame.from_table('sales')
>>> df.csum(sort_columns=[df.accounts, df.Feb.desc()], drop_columns=True)
   csum_Feb  csum_Jan  csum_Mar  csum_Apr
0     500.0       400       450       531
1     910.0       550       590       781
2    1000.0       550       590       781
3     710.0       400       450       781
4     300.0       250       310       351
5     210.0       200       215       250