# Table.sort
URL: https://lsd.tools/docs/api-table-sort
Updated: 2026-07-17

## Parameters

| name | type | default | description |
|---|---|---|---|
| `by` | `str` \| `list[str]` | — | one column name, or a list to sort by in priority order |
| `descending` | `bool` | `False` | direction — `True` sorts high-to-low |

## Example

```python
t.sort("score", descending=True)
```

Sort by several columns (each in the same direction):

```python
t.sort(["team", "score"])
```

## Notes

`descending` is a single `bool` applied to **all** sort keys — there is no per-key direction.
Every call returns a **new** `Table`.

## See also

**API:** [head](/docs/api-table-head) · [filter](/docs/api-table-filter) · [group_by](/docs/api-table-group-by)

**Guides:** [Tables & data flow](/docs/tools-tables)
