Type Alias polars_core::datatypes::ObjectChunked

source ·
pub type ObjectChunked<T> = ChunkedArray<ObjectType<T>>;
Available on crate feature object only.

Aliased Type§

struct ObjectChunked<T> { /* private fields */ }

Implementations§

source§

impl<T> ObjectChunked<T>
where T: PolarsObject,

source

pub fn new_from_vec(name: &str, v: Vec<T>) -> Self

source

pub fn new_from_vec_and_validity( name: &str, v: Vec<T>, validity: Bitmap ) -> Self

source

pub fn new_empty(name: &str) -> Self

source§

impl<T> ObjectChunked<T>
where T: PolarsObject,

source

pub unsafe fn get_object_unchecked( &self, index: usize ) -> Option<&dyn PolarsObjectSafe>

Get a hold to an object that can be formatted or downcasted via the Any trait.

§Safety

No bounds checks

source

pub fn get_object(&self, index: usize) -> Option<&dyn PolarsObjectSafe>

Get a hold to an object that can be formatted or downcasted via the Any trait.

Trait Implementations§

source§

impl<T: PolarsObject> AggList for ObjectChunked<T>

Available on crate feature algorithm_group_by only.
source§

unsafe fn agg_list(&self, groups: &GroupsProxy) -> Series

Safety Read more
source§

impl<T: PolarsObject> ChunkAggSeries for ObjectChunked<T>

source§

fn sum_reduce(&self) -> Scalar

Get the sum of the ChunkedArray as a new Series of length 1.
source§

fn max_reduce(&self) -> Scalar

Get the max of the ChunkedArray as a new Series of length 1.
source§

fn min_reduce(&self) -> Scalar

Get the min of the ChunkedArray as a new Series of length 1.
source§

fn prod_reduce(&self) -> Scalar

Get the product of the ChunkedArray as a new Series of length 1.
source§

impl<T: PolarsObject> ChunkAnyValue for ObjectChunked<T>

source§

unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>

Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
source§

fn get_any_value(&self, index: usize) -> PolarsResult<AnyValue<'_>>

Get a single value. Beware this is slow.
source§

impl<'a, T> ChunkApply<'a, &'a T> for ObjectChunked<T>
where T: PolarsObject,

§

type FuncRet = T

source§

fn apply_values<F>(&'a self, f: F) -> Self
where F: Fn(&'a T) -> T + Copy,

Apply a closure elementwise. This is fastest when the null check branching is more expensive than the closure application. Often it is. Read more
source§

fn apply<F>(&'a self, f: F) -> Self
where F: Fn(Option<&'a T>) -> Option<T> + Copy,

Apply a closure elementwise including null values.
source§

fn apply_to_slice<F, V>(&'a self, f: F, slice: &mut [V])
where F: Fn(Option<&'a T>, &V) -> V,

Apply a closure elementwise and write results to a mutable slice.
source§

impl<T: PolarsObject> ChunkExpandAtIndex<ObjectType<T>> for ObjectChunked<T>

source§

fn new_from_index(&self, index: usize, length: usize) -> ObjectChunked<T>

Create a new ChunkedArray filled with values at that index.
source§

impl<T> ChunkFilter<ObjectType<T>> for ObjectChunked<T>
where T: PolarsObject,

source§

fn filter( &self, filter: &BooleanChunked ) -> PolarsResult<ChunkedArray<ObjectType<T>>>
where Self: Sized,

Filter values in the ChunkedArray with a boolean mask. Read more
source§

impl<T: PolarsObject> ChunkFull<T> for ObjectChunked<T>

source§

fn full(name: &str, value: T, length: usize) -> Self
where Self: Sized,

Create a ChunkedArray with a single value.
source§

impl<T: PolarsObject> ChunkFullNull for ObjectChunked<T>

source§

fn full_null(name: &str, length: usize) -> ObjectChunked<T>

source§

impl<T: PolarsObject> ChunkQuantile<Series> for ObjectChunked<T>

source§

fn median(&self) -> Option<T>

Returns the mean value in the array. Returns None if the array is empty or only contains null values.
source§

fn quantile( &self, _quantile: f64, _interpol: QuantileInterpolOptions ) -> PolarsResult<Option<T>>

Aggregate a given quantile of the ChunkedArray. Returns None if the array is empty or only contains null values.
source§

impl<T: PolarsObject> ChunkReverse for ObjectChunked<T>

source§

fn reverse(&self) -> Self

Return a reversed version of this array.
source§

impl<T: PolarsObject> ChunkShift<ObjectType<T>> for ObjectChunked<T>

source§

fn shift(&self, periods: i64) -> Self

source§

impl<T: PolarsObject> ChunkShiftFill<ObjectType<T>, Option<ObjectType<T>>> for ObjectChunked<T>

source§

fn shift_and_fill( &self, _periods: i64, _fill_value: Option<ObjectType<T>> ) -> ChunkedArray<ObjectType<T>>

Shift the values by a given period and fill the parts that will be empty due to this operation with fill_value.
source§

impl<T: PolarsObject> ChunkUnique for ObjectChunked<T>

Available on crate feature algorithm_group_by only.
source§

fn unique(&self) -> PolarsResult<ChunkedArray<ObjectType<T>>>

Get unique values of a ChunkedArray
source§

fn arg_unique(&self) -> PolarsResult<IdxCa>

Get first index of the unique values in a ChunkedArray. This Vec is sorted.
source§

fn n_unique(&self) -> PolarsResult<usize>

Number of unique values in the ChunkedArray
source§

impl<T: PolarsObject> ChunkVar for ObjectChunked<T>

source§

fn var(&self, _ddof: u8) -> Option<f64>

Compute the variance of this ChunkedArray/Series.
source§

fn std(&self, _ddof: u8) -> Option<f64>

Compute the standard deviation of this ChunkedArray/Series.
source§

impl<T> Debug for ObjectChunked<T>
where T: PolarsObject,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: PolarsObject> FromIterator<Option<T>> for ObjectChunked<T>

source§

fn from_iter<I: IntoIterator<Item = Option<T>>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<T: PolarsObject> FromTrustedLenIterator<Option<T>> for ObjectChunked<T>

source§

fn from_iter_trusted_length<I: IntoIterator<Item = Option<T>>>(iter: I) -> Self

source§

impl<T> IntoGroupsProxy for ObjectChunked<T>
where T: PolarsObject,

Available on crate feature algorithm_group_by only.
source§

fn group_tuples( &self, _multithreaded: bool, sorted: bool ) -> PolarsResult<GroupsProxy>

Create the tuples need for a group_by operation. * The first value in the tuple is the first index of the group. * The second value in the tuple is the indexes of the groups including the first value.
source§

impl<'a, T> IntoIterator for &'a ObjectChunked<T>
where T: PolarsObject,

§

type Item = Option<&'a T>

The type of the elements being iterated over.
§

type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<ObjectType<T>> as IntoIterator>::Item> + 'a>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T: PolarsObject> NamedFrom<&[T], &[T]> for ObjectChunked<T>

source§

fn new(name: &str, v: &[T]) -> Self

Initialize by name and values.
source§

impl<T: PolarsObject, S: AsRef<[Option<T>]>> NamedFrom<S, [Option<T>]> for ObjectChunked<T>

source§

fn new(name: &str, v: S) -> Self

Initialize by name and values.
source§

impl<T> NewChunkedArray<ObjectType<T>, T> for ObjectChunked<T>
where T: PolarsObject,

source§

fn from_iter_values(name: &str, it: impl Iterator<Item = T>) -> ObjectChunked<T>

Create a new ChunkedArray from an iterator.

source§

fn from_slice(name: &str, v: &[T]) -> Self

source§

fn from_slice_options(name: &str, opt_v: &[Option<T>]) -> Self

source§

fn from_iter_options( name: &str, it: impl Iterator<Item = Option<T>> ) -> ObjectChunked<T>

Create a new ChunkedArray from an iterator.
source§

impl<T> VecHash for ObjectChunked<T>
where T: PolarsObject,

source§

fn vec_hash( &self, random_state: RandomState, buf: &mut Vec<u64> ) -> PolarsResult<()>

Compute the hash for all values in the array. Read more
source§

fn vec_hash_combine( &self, random_state: RandomState, hashes: &mut [u64] ) -> PolarsResult<()>