ChunkedArray¶
arro3.core.ChunkedArray ¶
__arrow_c_stream__
method descriptor
¶
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 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:
-
target_type
(ArrowSchemaExportable
) –Type to cast array to.
chunk
method descriptor
¶
combine_chunks
method descriptor
¶
combine_chunks() -> Array
Flatten this ChunkedArray into a single non-chunked array.
equals
method descriptor
¶
equals(other: ArrowStreamExportable) -> bool
Return whether the contents of two chunked arrays are equal.
from_arrow
builtin
¶
from_arrow(input: ArrowArrayExportable | ArrowStreamExportable) -> ChunkedArray
Construct this from an existing Arrow object.
It can be called on anything that exports the Arrow stream interface (has an
__arrow_c_stream__
method). All batches from the stream will be materialized
in memory.
from_arrow_pycapsule
builtin
¶
from_arrow_pycapsule(capsule) -> ChunkedArray
Construct this object from a bare Arrow PyCapsule
slice
method descriptor
¶
slice(offset: int = 0, length: int | None = None) -> ChunkedArray
Compute zero-copy slice of this ChunkedArray
Parameters:
-
offset
(int
, default:0
) –Offset from start of array to slice. Defaults to 0.
-
length
(int | None
, default:None
) –Length of slice (default is until end of batch starting from offset).
Returns:
-
ChunkedArray
–New ChunkedArray