Skip to content

Constructors

arro3.core

fixed_size_list_array

fixed_size_list_array(
    values: ArrowArrayExportable,
    list_size: int,
    *,
    type: ArrowSchemaExportable | None = None
) -> Array

Construct a new fixed size list array

Parameters:

  • values (ArrowArrayExportable) –

    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: ArrowArrayExportable,
    values: ArrowArrayExportable,
    *,
    type: ArrowSchemaExportable | None = None
) -> Array

Construct a new list array

Parameters:

  • offsets (ArrowArrayExportable) –

    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 (ArrowArrayExportable) –

    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[ArrowArrayExportable],
    *,
    fields: Sequence[ArrowSchemaExportable],
    type: ArrowSchemaExportable | None = None
) -> Array

Construct a new struct array

Parameters:

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