Struct polars_core::prelude::ArrowSchema
source · pub struct ArrowSchema {
pub fields: Vec<Field>,
pub metadata: BTreeMap<String, String>,
}Expand description
An ordered sequence of Fields with associated Metadata.
ArrowSchema is an abstraction used to read from, and write to, Arrow IPC format,
Apache Parquet, and Apache Avro. All these formats have a concept of a schema
with fields and metadata.
Fields§
§fields: Vec<Field>The fields composing this schema.
metadata: BTreeMap<String, String>Optional metadata.
Implementations§
source§impl ArrowSchema
impl ArrowSchema
sourcepub fn with_metadata(self, metadata: BTreeMap<String, String>) -> ArrowSchema
pub fn with_metadata(self, metadata: BTreeMap<String, String>) -> ArrowSchema
Attaches a Metadata to ArrowSchema
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn filter<F>(self, predicate: F) -> ArrowSchema
pub fn filter<F>(self, predicate: F) -> ArrowSchema
Returns a new ArrowSchema with a subset of all fields whose predicate
evaluates to true.
pub fn try_project(&self, indices: &[usize]) -> Result<ArrowSchema, PolarsError>
Trait Implementations§
source§impl Clone for ArrowSchema
impl Clone for ArrowSchema
source§fn clone(&self) -> ArrowSchema
fn clone(&self) -> ArrowSchema
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ArrowSchema
impl Debug for ArrowSchema
source§impl Default for ArrowSchema
impl Default for ArrowSchema
source§fn default() -> ArrowSchema
fn default() -> ArrowSchema
Returns the “default value” for a type. Read more
source§impl From<&ArrowSchema> for Schema
impl From<&ArrowSchema> for Schema
source§fn from(value: &ArrowSchema) -> Self
fn from(value: &ArrowSchema) -> Self
Converts to this type from the input type.
source§impl From<ArrowSchema> for Schema
impl From<ArrowSchema> for Schema
source§fn from(value: ArrowSchema) -> Self
fn from(value: ArrowSchema) -> Self
Converts to this type from the input type.
source§impl IndexOfSchema for ArrowSchema
impl IndexOfSchema for ArrowSchema
source§impl PartialEq for ArrowSchema
impl PartialEq for ArrowSchema
source§impl SchemaNamesAndDtypes for ArrowSchema
impl SchemaNamesAndDtypes for ArrowSchema
impl Eq for ArrowSchema
impl StructuralPartialEq for ArrowSchema
Auto Trait Implementations§
impl Freeze for ArrowSchema
impl RefUnwindSafe for ArrowSchema
impl Send for ArrowSchema
impl Sync for ArrowSchema
impl Unpin for ArrowSchema
impl UnwindSafe for ArrowSchema
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more