Struct polars_arrow::datatypes::ArrowSchema
source · pub struct ArrowSchema {
pub fields: Vec<Field>,
pub metadata: Metadata,
}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: MetadataOptional metadata.
Implementations§
source§impl ArrowSchema
impl ArrowSchema
sourcepub fn with_metadata(self, metadata: Metadata) -> Self
pub fn with_metadata(self, metadata: Metadata) -> Self
Attaches a Metadata to ArrowSchema
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn filter<F: Fn(usize, &Field) -> bool>(self, predicate: F) -> Self
pub fn filter<F: Fn(usize, &Field) -> bool>(self, predicate: F) -> Self
Returns a new ArrowSchema with a subset of all fields whose predicate
evaluates to true.
pub fn try_project(&self, indices: &[usize]) -> PolarsResult<Self>
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<'de> Deserialize<'de> for ArrowSchema
impl<'de> Deserialize<'de> for ArrowSchema
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ArrowSchema
impl PartialEq for ArrowSchema
source§impl Serialize for ArrowSchema
impl Serialize 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