pub type Schema = Schema<DataType>;
Aliased Type§
struct Schema { /* private fields */ }
Trait Implementations§
Source§impl SchemaExt for Schema
impl SchemaExt for Schema
Source§fn get_field(&self, name: &str) -> Option<Field>
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>
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
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> + '_
fn iter_fields(&self) -> impl ExactSizeIterator<Item = Field> + '_
Source§fn to_supertype(&mut self, other: &Schema) -> PolarsResult<bool>
fn to_supertype(&mut self, other: &Schema) -> PolarsResult<bool>
Take another Schema
and try to find the supertypes between them.