pyarrow.union#

pyarrow.union(child_fields,mode,type_codes=None)#

Create UnionType from child fields.

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

Unions come in two flavors: sparse and dense(see alsopyarrow.sparse_union andpyarrow.dense_union).

Parameters:
child_fieldssequence ofField values

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

modestr

Must be ‘sparse’ or ‘dense’

type_codeslist ofintegers, defaultNone
Returns:
typeUnionType