Quick Reference · Apache Arrow for Python · columnar in-memory data

pyarrow cheat sheet

Arrow is one columnar memory format that many libraries and languages share. PyArrow gives you the pieces — ArrayChunkedArrayTable — plus compute kernels, fast file I/O, and datasets. The payoff: read only the columns you need, compute on them vectorized, and hand data to pandas / NumPy / Polars often with zero copies.

setup / import data model compute file I/O datasets / cloud interop gotcha most common

Distilled & cross-checked against: arrow.apache.org/docs/python (data model, compute, parquet, dataset, fs) · PyPI · community guides (Medium, DEV, Substack)  — API for PyArrow ≈ 25.x

The mental model · one columnar format, shared across storage, compute & other libraries
On disk Parquet · CSV Feather/IPC · ORC STORAGE Arrow Table columnar · in memory Schema + ChunkedArrays the hub — RAM-resident Analytics libs pandas · NumPy Polars · DuckDB CONSUMERS read_table · scanner write_table · write_dataset to_pandas · to_numpy from_pandas · pa.array often zero-copy pyarrow.compute filter · group_by · sort · join ▲ dataset pushdown: pick columns & filter rows before bytes are even read
01Setup & Importthe submodules
The Data Modelknow these five
03Create Arrays & Tablesfrom Python data
04Types & Schemafactory functions
05Table Anatomyinspect & reshape
06Compute · Filterexpressions & masks
07Compute · Aggregategroup & reduce
08Compute · Transformper-element kernels
09Joincombine tables
10Parquetthe default format
11CSV · Feather · IPCother formats
12Datasetsbigger than memory
13Filesystemslocal & cloud
14pandas / NumPythe hand-off
15Gotchascommon surprises

Four ideas that make Arrow click

The columnar data model, why it's fast, how nulls work, and the zero-copy hand-off. Based on the official Apache Arrow docs.

the data model, nested

An Array is one column-chunk. Stack chunks → ChunkedArray (a column). Line up columns under a schema → Table.

Array chunk ChunkedArray chunk 0 chunk 1 chunk 2 Table = Schema + columns schema: a: int64 b: str c: bool col acol bcol c each column is a ChunkedArray

columnar, not row-wise

Arrow stores each column contiguously. That means SIMD-friendly compute and reading only the columns a query touches.

row layout → abcabcabc interleaved Arrow columnar → aaabbbccc all aall ball c contiguous per column → vectorized + column projection

nulls = a validity bitmap

Every array carries a separate 1-bit-per-value bitmap. No sentinel value, no wasted space — and null checks are just bit ops.

values 7·39· validity 10110 1 = valid · 0 = null (the value slot is ignored)

zero-copy sharing

The same memory buffers back an Arrow Table, an Arrow-dtype pandas frame, NumPy, and other languages via the C Data Interface — no serialization.

Arrow buffers shared memory pandas NumPy Polars C / Rust / R same bytes · many views · no copy

Worth memorizing

columnarstored by column → vectorized compute + cheap projection
zero-copyArrow ⇄ pandas/NumPy/Polars often share buffers
immutablearrays never change in place; ops return new objects
Array ⊂ ChunkedArray ⊂ Tablechunk, column, table of columns
pushdownds.scanner(columns=, filter=) prunes before reading
pd.ArrowDtypeto_pandas(types_mapper=pd.ArrowDtype) stays Arrow-backed
nullsa separate validity bitmap, not a sentinel
Feather = Arrow IPCthe on-disk form of the in-memory format
combine_chunks()needed before a zero-copy to_numpy()
stay in Arrowconvert to pandas late & narrow (few cols, filtered)