sort
The sort method returns a new PartitionedTable in which the rows are ordered based on values in a specified set of columns.
Warning
A partitioned table cannot be sorted on its __CONSTITUENT__ column.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| order_by | Union[str, Sequence[str]] | The column(s) to be sorted on. Cannot include the |
| order | Union[SortDirection, Sequence[SortDirection]] | The sort order(s). Default is |
Returns
A sorted PartitionedTable.
Examples
The following example partitions a source table on a single column. The partitioned table is then sorted on that key column in descending order.
The following example partitions a source table on two columns. The partitioned table is then sorted in ascending order on Exchange and descending order on Coin.