Struct polars_core::schema::Schema
source · [−]pub struct Schema { /* private fields */ }
Implementations
sourceimpl Schema
impl Schema
pub fn try_from_fallible<I>(flds: I) -> PolarsResult<Self>where
I: IntoIterator<Item = PolarsResult<Field>>,
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn rename(&mut self, old: &str, new: String) -> Option<()>
pub fn insert_index(
&self,
index: usize,
name: String,
dtype: DataType
) -> Option<Self>
pub fn get(&self, name: &str) -> Option<&DataType>
pub fn try_get(&self, name: &str) -> PolarsResult<&DataType>
pub fn get_full(&self, name: &str) -> Option<(usize, &String, &DataType)>
pub fn get_field(&self, name: &str) -> Option<Field>
pub fn try_get_field(&self, name: &str) -> PolarsResult<Field>
pub fn get_index(&self, index: usize) -> Option<(&String, &DataType)>
pub fn get_index_mut(
&mut self,
index: usize
) -> Option<(&mut String, &mut DataType)>
pub fn coerce_by_name(&mut self, name: &str, dtype: DataType) -> Option<()>
pub fn coerce_by_index(&mut self, index: usize, dtype: DataType) -> Option<()>
pub fn with_column(&mut self, name: String, dtype: DataType)
pub fn merge(&mut self, other: Self)
pub fn to_arrow(&self) -> ArrowSchema
pub fn iter_fields(
&self
) -> impl Iterator<Item = Field> + ExactSizeIterator + '_
pub fn iter_dtypes(
&self
) -> impl Iterator<Item = &DataType> + ExactSizeIterator + '_
pub fn iter_names(
&self
) -> impl Iterator<Item = &String> + '_ + ExactSizeIterator
pub fn iter(&self) -> impl Iterator<Item = (&String, &DataType)> + '_
Trait Implementations
sourceimpl<J> FromIterator<J> for Schemawhere
J: Into<Field>,
impl<J> FromIterator<J> for Schemawhere
J: Into<Field>,
sourcefn from_iter<I: IntoIterator<Item = J>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = J>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl IndexOfSchema for Schema
impl IndexOfSchema for Schema
fn try_index_of(&self, name: &str) -> PolarsResult<usize>
sourceimpl IntoIterator for Schema
impl IntoIterator for Schema
impl Eq for Schema
impl StructuralEq for Schema
impl StructuralPartialEq for Schema
Auto Trait Implementations
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.