Type Alias polars_core::schema::Schema

source ·
pub type Schema = Schema<DataType>;

Aliased Type§

struct Schema { /* private fields */ }

Trait Implementations§

source§

impl From<&Row<'_>> for Schema

Available on crate features rows or object only.
source§

fn from(row: &Row<'_>) -> Self

Converts to this type from the input type.
source§

impl SchemaExt for Schema

source§

fn get_field(&self, name: &str) -> Option<Field>

Look up the name in the schema and return an owned Field by cloning the data.

Returns None if the field does not exist.

This method constructs the Field by cloning the name and dtype. For a version that returns references, see [get][Self::get] or [get_full][Self::get_full].

source§

fn try_get_field(&self, name: &str) -> PolarsResult<Field>

Look up the name in the schema and return an owned Field by cloning the data.

Returns Err(PolarsErr) if the field does not exist.

This method constructs the Field by cloning the name and dtype. For a version that returns references, see [get][Self::get] or [get_full][Self::get_full].

source§

fn to_arrow(&self, compat_level: CompatLevel) -> ArrowSchema

Convert self to ArrowSchema by cloning the fields.

source§

fn iter_fields(&self) -> impl ExactSizeIterator<Item = Field> + '_

Iterates the Fields in this schema, constructing them anew by cloning each (&name, &dtype) pair.

Note that this clones each name and dtype in order to form an owned Field. For a clone-free version, use [iter][Self::iter], which returns (&name, &dtype).

source§

fn to_supertype(&mut self, other: &Schema) -> PolarsResult<bool>

Take another Schema and try to find the supertypes between them.

source§

fn from_arrow_schema(value: &ArrowSchema) -> Self

source§

impl SchemaNamesAndDtypes for Schema