arro3-io is a Python library that provides streaming-capable readers and writers for various Apache Arrow-compatible data formats, including Parquet, Arrow IPC, JSON, and CSV. It is an integral part of the `arro3` ecosystem, which aims to be a minimal Python interface to Apache Arrow's Rust implementation, offering a more lightweight alternative to PyArrow. The library emphasizes a streaming-first approach, enabling efficient processing of larger-than-memory datasets through lazy iterators. It is actively maintained, with the current version being 0.8.0, and integrates seamlessly with other Python data libraries that implement the Arrow PyCapsule Interface.
pip install arro3-ioVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `arro3-io` to write and read Apache Arrow-compatible data. It showcases the creation of data using Pandas and PyArrow, writing it to an in-memory buffer using `arro3.io.write_parquet`, then reading it back with `arro3.io.read_parquet`. The streaming `RecordBatchReader` is then materialized into an `arro3.core.Table`, and finally converted back to PyArrow and Pandas to highlight interoperability.
Review code that relies on explicit nullability assumptions when interacting with `DataType` objects passed between `arro3` and `pyarrow`. Ensure your code handles `nullable: true` for bare `DataType` objects where applicable.
Ensure you install `arro3-core` alongside `arro3-io` (`pip install arro3-core arro3-io`) and import core data structures from `arro3.core` (e.g., `from arro3.core import Table`).
To materialize the data, call `.read_all()` on the `RecordBatchReader` or pass the reader directly to `arro3.core.Table()` (e.g., `table = arro3.core.Table(reader)`).
Change your import statement from `import arrow3.io` to `import arro3.io`. Ensure you have installed the correct package: `pip install arro3-io`.
Import `Table` from `arro3.core`: `from arro3.core import Table`. You may also need to install `arro3-core` if you haven't already: `pip install arro3-core`.
Materialize the `RecordBatchReader` into a `Table` or iterate over it. For example, `table = arro3.core.Table(reader)` or `for batch in reader: ...`.