pyarrow.schema

pyarrow.schema(fields, metadata=None)

Construct pyarrow.Schema from collection of fields

Parameters:
  • field (iterable of Fields or tuples, or mapping of strings to DataTypes) –
  • metadata (dict, default None) – Keys and values must be coercible to bytes

Examples

import pyarrow as pa
fields = [
    ('some_int', pa.int32()),
    ('some_string', pa.string()),
]
schema = pa.schema(fields)
Returns:schema (pyarrow.Schema)