All docs
Docs/ API Reference/ Column
API Reference

Column

Column wraps a concrete Arrow array. Python operators evaluate whole-column Arrow kernels immediately and return a new Column for Table.filter or Table.with_column.

t["name"] returns a Column wrapping the table's concrete Arrow ChunkedArray. The wrapper also supports an Arrow Array; its .arrow property returns the underlying object without copying.

Python operators evaluate immediately through whole-column pyarrow.compute kernels and return new Column values. They do not build a deferred expression tree. Pass the resulting mask to filter, or a derived column to with_column. For example, t["x"] * 2 computes the multiplication when that line runs, without a Python loop over rows. Wrapping existing data is zero-copy; computing a result can allocate new Arrow arrays.

Category Operators Result
Arithmetic + - * / a numeric Column
Comparison > >= < <= == != a boolean Column (a mask)
Boolean & (and) · | (or) · ~ (not) a boolean Column
Null checks is_valid() · is_null() a boolean Column

Usage#

Python
from lsdtools import Table

t = Table({"name": ["ann", None, "cy"], "score": [12, 30, 7]})
mask = (t["score"] > 10) & t["name"].is_valid()
t.filter(mask).print()
# → name:["ann"] score:[12]

Build a derived column the same way and store it with with_column:

Python
t.with_column("bonus", t["score"] * 2)

Where to start#

LearnTables & data flow · Shape steps

ExamplesClean a CSV

APITable · filter · with_column

Properties

  • arrow the underlying pyarrow ChunkedArray or Array, zero-copy

Methods

  • is_null a bool column, true where the value is null
  • is_valid a bool column, true where the value is present (not null)
By LSD Team · Last updated Sep 09, 2026 Ask a question View as Markdown
Type to search every doc, guide, and tutorial.
↑↓ navigate openesc close