Schema¶
arro3.core.Schema ¶
An arrow Schema.
metadata
property
¶
metadata_str
property
¶
types
property
¶
__arrow_c_schema__ ¶
__arrow_c_schema__() -> object
An implementation of the Arrow PyCapsule Interface. This dunder method should not be called directly, but enables zero-copy data transfer to other Python libraries that understand Arrow memory.
For example, you can call pyarrow.schema()
to convert this
array into a pyarrow schema, without copying memory.
append ¶
append(field: ArrowSchemaExportable) -> Schema
Append a field at the end of the schema.
In contrast to Python's list.append()
it does return a new object, leaving the
original Schema unmodified.
Parameters:
-
field
(ArrowSchemaExportable
) –new field
Returns:
-
Schema
–New Schema
equals ¶
equals(other: ArrowSchemaExportable) -> bool
Test if this schema is equal to the other
Parameters:
-
other
(ArrowSchemaExportable
) –description
Returns:
-
bool
–description
field ¶
from_arrow
classmethod
¶
from_arrow(input: ArrowSchemaExportable) -> Schema
Construct this from an existing Arrow object
Parameters:
-
input
(ArrowSchemaExportable
) –Arrow schema to use for constructing this object
Returns:
-
Schema
–description
from_arrow_pycapsule
classmethod
¶
from_arrow_pycapsule(capsule) -> Schema
Construct this object from a bare Arrow PyCapsule
get_all_field_indices ¶
get_field_index ¶
insert ¶
insert(i: int, field: ArrowSchemaExportable) -> Schema
Add a field at position i
to the schema.
Parameters:
-
i
(int
) –description
-
field
(ArrowSchemaExportable
) –description
Returns:
-
Schema
–description
remove ¶
set ¶
set(i: int, field: ArrowSchemaExportable) -> Schema
Replace a field at position i
in the schema.
Parameters:
-
i
(int
) –description
-
field
(ArrowSchemaExportable
) –description
Returns:
-
Schema
–description