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

`Table` is the data that flows between steps — an immutable, zero-copy view over one
`pyarrow.Table`. Every verb returns a **new** `Table` (or a [`Column`](/docs/api-column)), and each
compiles to a single Arrow compute kernel, so chains stay zero-copy and fast. The point is that a
geologist never types `pyarrow.compute` and an LLM gets a small, promptable verb list — while
performance stays identical to raw pyarrow.

## Usage

Build one by calling the `Table(...)` constructor, then chain verbs:

```python
from lsdtools import Table

t = Table({"name": ["ann", "bob", "cy"], "score": [12, 30, 7]})
top = t.filter(t["score"] > 10).sort("score", descending=True)
top.print()
# → name:["bob","ann"] score:[30,12]
```

Inside a step you receive a `Table` as an input port and return one:

```python
@tool.shape
def keep_top(t: Table, cutoff: int = 10) -> Table:
    return t.filter(t["score"] >= cutoff)
```

## Where to start

**Learn** — [Tables & data flow](/docs/tools-tables) · [Shape steps](/docs/tools-shape)

**Examples** — [Clean a CSV](/docs/ex-clean-csv)

**API** — [Column](/docs/api-column) · [Source](/docs/api-source) · [Context](/docs/api-context) · [Engine](/docs/api-engine)
