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:
- Returns:
- type
SparseUnionType
- type