pyarrow.union# pyarrow.union(child_fields, mode, type_codes=None)# 通过子字段创建 UnionType。 Union(联合类型)是一种嵌套类型,其中每个逻辑值都取自单个子字段。一个 8 位类型 ID 的缓冲区用于指示给定的逻辑值应取自哪个子字段。 Union 分为两种类型:稀疏(sparse)和稠密(dense)(另请参阅 pyarrow.sparse_union 和 pyarrow.dense_union)。 参数: child_fieldssequence of Field values每个字段必须具有 UTF8 编码的名称,这些字段名称是类型元数据的一部分。 modestr必须为 ‘sparse’ 或 ‘dense’ type_codeslist of integers, default None 返回: typeUnionType