Constructors¶
arro3.core ¶
fixed_size_list_array ¶
fixed_size_list_array(
values: ArrayInput,
list_size: int,
*,
type: ArrowSchemaExportable | None = None
) -> Array
Construct a new fixed size list array
Parameters:
-
values
(ArrayInput
) –the values of the new fixed size list array
-
list_size
(int
) –the number of elements in each item of the list.
Other Parameters:
-
type
(ArrowSchemaExportable | None
) –the type of output array. This must have fixed size list type. You may pass a
Field
into this parameter to associate extension metadata with the created array. Defaults to None, in which case it is inferred.
Returns:
-
Array
–a new Array with fixed size list type
list_array ¶
list_array(
offsets: ArrayInput,
values: ArrayInput,
*,
type: ArrowSchemaExportable | None = None
) -> Array
Construct a new list array
Parameters:
-
offsets
(ArrayInput
) –the offsets for the output list array. This array must have type int32 or int64, depending on whether you wish to create a list array or large list array.
-
values
(ArrayInput
) –the values for the output list array.
Other Parameters:
-
type
(ArrowSchemaExportable | None
) –the type of output array. This must have list or large list type. You may pass a
Field
into this parameter to associate extension metadata with the created array. Defaults to None, in which case it is inferred.
Returns:
-
Array
–a new Array with list or large list type
struct_array ¶
struct_array(
arrays: Sequence[ArrayInput],
*,
fields: Sequence[ArrowSchemaExportable],
type: ArrowSchemaExportable | None = None
) -> Array
Construct a new struct array
Parameters:
-
arrays
(Sequence[ArrayInput]
) –a sequence of arrays for the struct children
Other Parameters:
-
fields
(Sequence[ArrowSchemaExportable]
) –a sequence of fields that represent each of the struct children
-
type
(ArrowSchemaExportable | None
) –the type of output array. This must have struct type. You may pass a
Field
into this parameter to associate extension metadata with the created array. Defaults to None, in which case it is inferred .
Returns:
-
Array
–a new Array with struct type