pyarrow.struct

pyarrow.struct(fields)

Create StructType instance from fields

Parameters:fields (iterable of Fields or tuples, or mapping of strings to DataTypes) –

Examples

import pyarrow as pa
fields = [
    ('f1', pa.int32()),
    ('f2', pa.string()),
]
struct_type = pa.struct(fields)

fields = [
    pa.field('f1', pa.int32()),
    pa.field('f2', pa.string(), nullable=false),
]
struct_type = pa.struct(fields)
Returns:type (DataType)