Struct polars_core::datatypes::StructChunked
source · pub struct StructChunked { /* private fields */ }
Available on crate feature
dtype-struct
only.Expand description
This is logical type StructChunked
that
dispatches most logic to the fields
implementations
Different from StructArray
, this
type does not have its own validity
. That means some operations
will be a bit less efficient because we need to check validity of all
fields. However this does save a lot of code and compile times.
Implementations§
source§impl StructChunked
impl StructChunked
pub fn new(name: &str, fields: &[Series]) -> PolarsResult<Self>
pub fn rechunk(&mut self)
sourcepub fn field_by_name(&self, name: &str) -> PolarsResult<Series>
pub fn field_by_name(&self, name: &str) -> PolarsResult<Series>
Get access to one of this [StructChunked]
’s fields
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn name(&self) -> &String
pub fn fields(&self) -> &[Series]
pub fn fields_mut(&mut self) -> &mut Vec<Series> ⓘ
pub fn rename(&mut self, name: &str)
Trait Implementations§
source§impl AggList for StructChunked
impl AggList for StructChunked
source§impl ChunkCompare<&StructChunked> for StructChunked
impl ChunkCompare<&StructChunked> for StructChunked
type Item = ChunkedArray<BooleanType>
source§fn equal(&self, rhs: &StructChunked) -> BooleanChunked
fn equal(&self, rhs: &StructChunked) -> BooleanChunked
Check for equality.
source§fn not_equal(&self, rhs: &StructChunked) -> BooleanChunked
fn not_equal(&self, rhs: &StructChunked) -> BooleanChunked
Check for inequality.
source§fn gt(&self, _rhs: &StructChunked) -> BooleanChunked
fn gt(&self, _rhs: &StructChunked) -> BooleanChunked
Greater than comparison.
source§fn gt_eq(&self, _rhs: &StructChunked) -> BooleanChunked
fn gt_eq(&self, _rhs: &StructChunked) -> BooleanChunked
Greater than or equal comparison.
source§fn lt(&self, _rhs: &StructChunked) -> BooleanChunked
fn lt(&self, _rhs: &StructChunked) -> BooleanChunked
Less than comparison.
source§fn lt_eq(&self, _rhs: &StructChunked) -> BooleanChunked
fn lt_eq(&self, _rhs: &StructChunked) -> BooleanChunked
Less than or equal comparison
source§impl Clone for StructChunked
impl Clone for StructChunked
source§fn clone(&self) -> StructChunked
fn clone(&self) -> StructChunked
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 Drop for StructChunked
Available on crate feature object
only.
impl Drop for StructChunked
Available on crate feature
object
only.source§impl From<StructChunked> for DataFrame
impl From<StructChunked> for DataFrame
source§fn from(ca: StructChunked) -> Self
fn from(ca: StructChunked) -> Self
Converts to this type from the input type.
source§impl<'a> IntoIterator for &'a StructChunked
impl<'a> IntoIterator for &'a StructChunked
source§impl IntoSeries for StructChunked
impl IntoSeries for StructChunked
source§impl IsIn for StructChunked
Available on crate feature is_in
only.
impl IsIn for StructChunked
Available on crate feature
is_in
only.source§fn is_in(&self, other: &Series) -> PolarsResult<BooleanChunked>
fn is_in(&self, other: &Series) -> PolarsResult<BooleanChunked>
Check if elements of this array are in the right Series, or List values of the right Series.
source§impl LogicalType for StructChunked
impl LogicalType for StructChunked
source§fn get_any_value(&self, i: usize) -> PolarsResult<AnyValue<'_>>
fn get_any_value(&self, i: usize) -> PolarsResult<AnyValue<'_>>
Gets AnyValue from LogicalType