pyarrow.Field

class pyarrow.Field

Bases: object

A named field, with a data type, nullability, and optional metadata.

Notes

Do not use this class’s constructor directly; use pyarrow.field

__init__()

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

Methods

add_metadata(self, metadata) Add metadata as dict of string keys and values to Field
equals(self, Field other) Test if this field is equal to the other
flatten(self) Flatten this field.
remove_metadata(self) Create new field without metadata, if any

Attributes

metadata
name
nullable
type
add_metadata(self, metadata)

Add metadata as dict of string keys and values to Field

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

Test if this field is equal to the other

Parameters:other (pyarrow.Field) –
Returns:is_equal (boolean)
flatten(self)

Flatten this field. If a struct field, individual child fields will be returned with their names prefixed by the parent’s name.

Returns:fields (List[pyarrow.Field])
metadata
name
nullable
remove_metadata(self)

Create new field without metadata, if any

Returns:field (pyarrow.Field)
type