Accessors¶
arro3.core ¶
dictionary_dictionary ¶
dictionary_dictionary(array: ArrowArrayExportable) -> Array
dictionary_dictionary(array: ArrowStreamExportable) -> ArrayReader
dictionary_dictionary(
array: ArrowArrayExportable | ArrowStreamExportable,
) -> Array | ArrayReader
Access the dictionary
of a dictionary array.
This is equivalent to the .dictionary
attribute on a PyArrow DictionaryArray.
Parameters:
-
array
(ArrowArrayExportable | ArrowStreamExportable
) –Argument to compute function.
Returns:
-
Array | ArrayReader
–The keys of a dictionary-encoded array.
dictionary_indices ¶
dictionary_indices(array: ArrowArrayExportable) -> Array
dictionary_indices(array: ArrowStreamExportable) -> ArrayReader
dictionary_indices(
array: ArrowArrayExportable | ArrowStreamExportable,
) -> Array | ArrayReader
Access the indices of a dictionary array.
This is equivalent to the .indices
attribute on a PyArrow DictionaryArray.
Parameters:
-
array
(ArrowArrayExportable | ArrowStreamExportable
) –Argument to compute function.
Returns:
-
Array | ArrayReader
–The indices of a dictionary-encoded array.
list_flatten ¶
list_flatten(input: ArrowArrayExportable) -> Array
list_flatten(input: ArrowStreamExportable) -> ArrayReader
list_flatten(
input: ArrowArrayExportable | ArrowStreamExportable,
) -> Array | ArrayReader
Unnest this ListArray, LargeListArray or FixedSizeListArray.
Parameters:
-
input
(ArrowArrayExportable | ArrowStreamExportable
) –Input data.
Returns:
-
Array | ArrayReader
–The flattened Arrow data.
list_offsets ¶
list_offsets(input: ArrowArrayExportable, *, logical: bool = True) -> Array
list_offsets(
input: ArrowStreamExportable, *, logical: bool = True
) -> ArrayReader
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 ¶
struct_field(
values: ArrowArrayExportable, /, indices: int | Sequence[int]
) -> Array
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