DAGDA SEARCH | Back to results | Support

pyarrow.sparse_union — Apache Arrow v26.0.1

Source: https://arrow.apache.org/docs/python/generated/pyarrow.sparse_union.html

pyarrow.sparse_union#

pyarrow.sparse_union(child_fields, type_codes=None)#

Create SparseUnionType from child fields.

A sparse union is a nested type where each logical value is taken from a single child. A buffer of 8-bit type ids indicates which child a given logical value is to be taken from.

In a sparse union, each child array should have the same length as the union array, regardless of the actual number of union values that refer to it.

Parameters:
child_fieldssequence of Field values

Each field must have a UTF8-encoded name, and these field names are part of the type metadata.

type_codeslist of integers, default None
Returns:
typeSparseUnionType
On this page Edit on GitHub