Trait polars::prelude::IndexOfSchema

source ·
pub trait IndexOfSchema: Debug {
    // Required methods
    fn index_of(&self, name: &str) -> Option<usize>;
    fn get_names(&self) -> Vec<&str>;

    // Provided method
    fn try_index_of(&self, name: &str) -> Result<usize, PolarsError> { ... }
}
Expand description

This trait exists to be unify the API of polars Schema and arrows Schema

Required Methods§

source

fn index_of(&self, name: &str) -> Option<usize>

Get the index of a column by name.

source

fn get_names(&self) -> Vec<&str>

Get a vector of all column names.

Provided Methods§

Implementors§