Working with Arrow in Python
Apache Arrow IPC file handling with high-performance columnar data processing.
Installation
Section titled “Installation”pip install fairspecGetting Started
Section titled “Getting Started”The Arrow plugin provides:
load_arrow_table- Load Arrow IPC files into tablessave_arrow_table- Save tables to Arrow IPC filesArrowPlugin- Plugin for framework integration
For example:
from fairspec import load_arrow_table, Resource
table = load_arrow_table(Resource(data="table.arrow"))# High-performance columnar formatBasic Usage
Section titled “Basic Usage”Loading Arrow Files
Section titled “Loading Arrow Files”from fairspec import load_arrow_table, Resource
# Load from local filetable = load_arrow_table(Resource(data="data.arrow"))
# Load from remote URLtable = load_arrow_table(Resource(data="https://example.com/data.arrow"))
# Load multiple files (concatenated)table = load_arrow_table(Resource(data=["file1.arrow", "file2.arrow"]))Saving Arrow Files
Section titled “Saving Arrow Files”from fairspec import save_arrow_table
# Save with default optionssave_arrow_table(table, path="output.arrow")Advanced Features
Section titled “Advanced Features”Remote File Loading
Section titled “Remote File Loading”from fairspec import load_arrow_table, Resource
# Load from URLtable = load_arrow_table(Resource(data="https://example.com/data.arrow"))
# Load multiple remote filestable = load_arrow_table(Resource(data=[ "https://api.example.com/data-2023.arrow", "https://api.example.com/data-2024.arrow",]))