arro3.compute¶
arro3.compute ¶
cast
builtin
¶
cast(
input: ArrowArrayExportable | ArrowStreamExportable,
to_type: ArrowSchemaExportable,
) -> Array | ArrayReader
Cast input
to the provided data type and return a new Arrow object with type to_type
, if
possible.
Parameters:
-
input
(ArrowArrayExportable | ArrowStreamExportable
) –an Arrow Array, RecordBatch, ChunkedArray, Table, ArrayReader, or RecordBatchReader
-
to_type
(ArrowSchemaExportable
) –an Arrow DataType, Field, or Schema describing the output type of the cast.
list_flatten
builtin
¶
list_flatten(
input: ArrowArrayExportable | ArrowStreamExportable,
) -> Array | ArrayReader
Unnest this ListArray, LargeListArray or FixedSizeListArray.
Parameters:
-
input
(ArrowArrayExportable | ArrowStreamExportable
) –description
Returns:
-
Array | ArrayReader
–description
list_offsets
builtin
¶
list_offsets(
input: ArrowArrayExportable | ArrowStreamExportable, *, logical: bool = True
) -> Array | ArrayReader
Access the offsets of this ListArray or LargeListArray
Parameters:
-
input
(ArrowArrayExportable | ArrowStreamExportable
) –description
-
physical
–If False, return the physical (unsliced) offsets of the provided list array. If True, adjust the list offsets for the current array slicing. Defaults to
True
.
Returns:
-
Array | ArrayReader
–description
struct_field
builtin
¶
Access a column within a StructArray by index
Parameters:
-
values
(ArrowArrayExportable
) –Argument to compute function.
-
indices
(int | Sequence[int]
) –List of indices for chained field lookup, for example [4, 1] will look up the second nested field in the fifth outer field.
Returns:
-
Array
–description