Skip to content

ChunkedArray

arro3.core.ChunkedArray

A Python-facing Arrow chunked array.

This is a wrapper around a [FieldRef] and a Vec of [ArrayRef].

chunks

chunks: list[Array] = <attribute 'chunks' of 'arro3.core._core.ChunkedArray' objects>

nbytes

nbytes: int = <attribute 'nbytes' of 'arro3.core._core.ChunkedArray' objects>

null_count

null_count: int = <attribute 'null_count' of 'arro3.core._core.ChunkedArray' objects>

num_chunks

num_chunks: int = <attribute 'num_chunks' of 'arro3.core._core.ChunkedArray' objects>

type

type: DataType = <attribute 'type' of 'arro3.core._core.ChunkedArray' objects>

__arrow_c_stream__ method descriptor

__arrow_c_stream__(requested_schema: object | None = None) -> object

An implementation of the Arrow PyCapsule Interface. This dunder method should not be called directly, but enables zero-copy data transfer to other Python libraries that understand Arrow memory.

For example (as of the upcoming pyarrow v16), you can call pyarrow.chunked_array() to convert this array into a pyarrow array, without copying memory.

cast method descriptor

cast(target_type: ArrowSchemaExportable) -> ChunkedArray

Cast array values to another data type

Parameters:

from_arrow builtin

Construct this from an existing Arrow object.

It can be called on anything that exports the Arrow stream interface (__arrow_c_stream__). All batches will be materialized in memory.

from_arrow_pycapsule builtin

from_arrow_pycapsule(capsule) -> ChunkedArray

Construct this object from a bare Arrow PyCapsule

to_numpy method descriptor

to_numpy() -> NDArray

Copy this array to a numpy NDArray