pyarrow.dense_union#
- pyarrow.dense_union(child_fields,type_codes=None)#
Create DenseUnionType from child fields.
A dense union is a nested type where each logical value is taken froma single child, at a specific offset. A buffer of 8-bit type idsindicates which child a given logical value is to be taken from,and a buffer of 32-bit offsets indicates at which physical positionin the given child array the logical value is to be taken from.
Unlike a sparse union, a dense union allows encoding only the child arrayvalues which are actually referred to by the union array. This iscounterbalanced by the additional footprint of the offsets buffer, andthe additional indirection cost when looking up values.
- Parameters:
- Returns:
- type
DenseUnionType
- type
On this page

