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

## Parameters

| name | type | default | description |
|---|---|---|---|
| `name` | `str` | — | the column to add or overwrite |
| `value` | `Column` \| `pa.Array` | — | a `Column` expression or a pyarrow array to store under `name` |

## Example

```python
t.with_column("bonus", t["score"] * 2)     # add a computed column
```

Reusing the name replaces the existing column:

```python
t.with_column("score", t["score"] + 1)     # overwrite in place (new Table)
```

## Notes

If `name` already exists it is replaced; otherwise it is appended as a new last column.
Every call returns a **new** `Table` — the original is untouched.

## See also

**API:** [filter](/docs/api-table-filter) · [select](/docs/api-table-select) · [Column](/docs/api-column)

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