pyarrow.lib.Schema

class pyarrow.lib.Schema

Bases: object

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

add_metadata(self, dict metadata) Add metadata as dict of string keys and values to Schema
equals(self, other) Test if this schema is equal to the other
field_by_name(self, name) Access a field by its name rather than the column index.
get_field_index(self, name)
remove_metadata(self) Create new schema without metadata, if any
serialize(self[, memory_pool]) Write Schema to Buffer as encapsulated IPC message
add_metadata(self, dict metadata)

Add metadata as dict of string keys and values to Schema

Parameters:metadata (dict) – Keys and values must be string-like / coercible to bytes
Returns:schema (pyarrow.Schema)
equals(self, other)

Test if this schema is equal to the other

field_by_name(self, name)

Access a field by its name rather than the column index.

Parameters:name (str) –
Returns:field (pyarrow.Field)
get_field_index(self, name)
metadata
names
remove_metadata(self)

Create new schema without metadata, if any

Returns:schema (pyarrow.Schema)
serialize(self, memory_pool=None)

Write Schema to Buffer as encapsulated IPC message

Parameters:memory_pool (MemoryPool, default None) – Uses default memory pool if not specified
Returns:serialized (Buffer)