pyarrow-python

Guides writing, testing, and debugging schema-explicit PyArrow columnar code in Python.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/schattenspiegel/skill-foundry-skills --skill pyarrow-python-schattenspiegel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pyarrow-python
Source: https://github.com/schattenspiegel/skill-foundry-skills/tree/main/skills/pyarrow-python
Command: npx skills add https://github.com/schattenspiegel/skill-foundry-skills --skill pyarrow-python-schattenspiegel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyarrow, and includes scripts (resource) and references (resource) components.

What problem does it solve? PyArrow code often fails silently through schema drift, unexpected nulls, chunking assumptions, unsafe casts, and unverified zero-copy or pushdown claims. This Skill enforces deliberate choices about object types, batch boundaries, nullability, memory ownership, and materialization points so Arrow-based pipelines behave predictably. ## Core Features & Use Cases - Object and workflow selection: Classify the right Arrow object (Array, ChunkedArray, RecordBatch, Table, RecordBatchReader, Dataset, Scanner) from the boundary contract instead of defaulting everything to Table. - Dataset scans with pushdown: Build typed Dataset scans with projection and predicate pushdown using dataset expressions, streaming bounded batches instead of materializing entire datasets. - Boundary testing and API grounding: Test schema equality, null counts, multi-chunk inputs, and reopened Parquet/IPC artifacts, and inspect the installed PyArrow API with the included script before relying on drifting options. - Use Case: When building a pipeline that scans partitioned Parquet files, use this Skill to pin an explicit schema, push filters into the scanner, stream record batches, and verify the persisted schema after writing. ## Quick Start Ask the AI to review or write PyArrow code for scanning a partitioned Parquet dataset with an explicit schema and streaming record batches.

Frequently Asked Questions about pyarrow-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a Parquet dataset with PyArrow without loading everything into memory?▼

Use pyarrow.dataset to create a Dataset, then bind projection and filter in dataset.scanner(...) and iterate scanner.to_batches() for bounded batches. Avoid to_table(), which materializes all selected rows into memory.

What is the difference between PyArrow Table, RecordBatch, and ChunkedArray?▼

A RecordBatch is equal-length arrays under one schema for bounded transport. A Table is a logical materialized table whose columns are ChunkedArrays, and a ChunkedArray is one logical column made of multiple same-typed arrays.

Does PyArrow nullable=False prevent null values in a table?▼

No. PyArrow can attach a non-nullable field to an array that still contains nulls during table construction. Build typed arrays, check null_count is zero for required fields, then construct the batch or table under the exact schema.

When should I use PyArrow instead of pandas for data transformation?▼

Use PyArrow when the implementation directly works with Arrow objects or must expose an Arrow-compatible boundary. Do not introduce PyArrow merely for small Python-list or pandas transformations, and use pyarrow.compute kernels rather than converting to pandas for supported operations.

Why does my PyArrow filter not prune Parquet files or row groups?▼

Pruning only works when filters use dataset Expression objects like ds.field(...), not Python functions or eager Boolean masks. Whether pruning actually occurs depends on fragments, partitioning, and statistics, so verify with plan inspection or measurement.

Is PyArrow conversion to pandas or NumPy always zero-copy?▼

No. Zero-copy is conditional on type, layout, alignment, mutability, and the source/consumer protocol. Conversions can allocate for bitmaps, offset widths, casts, or incompatible nullable types, so verify actual buffers rather than trusting API names.