polars_core::chunked_array

Struct ChunkedArray

Source
pub struct ChunkedArray<T: PolarsDataType> { /* private fields */ }
Expand description

§ChunkedArray

Every Series contains a ChunkedArray<T>. Unlike Series, ChunkedArrays are typed. This allows us to apply closures to the data and collect the results to a ChunkedArray of the same type T. Below we use an apply to use the cosine function to the values of a ChunkedArray.

fn apply_cosine_and_cast(ca: &Float32Chunked) -> Float32Chunked {
    ca.apply_values(|v| v.cos())
}

§Conversion between Series and ChunkedArrays

Conversion from a Series to a ChunkedArray is effortless.

fn to_chunked_array(series: &Series) -> PolarsResult<&Int32Chunked>{
    series.i32()
}

fn to_series(ca: Int32Chunked) -> Series {
    ca.into_series()
}

§Iterators

ChunkedArrays fully support Rust native Iterator and DoubleEndedIterator traits, thereby giving access to all the excellent methods available for Iterators.


fn iter_forward(ca: &Float32Chunked) {
    ca.iter()
        .for_each(|opt_v| println!("{:?}", opt_v))
}

fn iter_backward(ca: &Float32Chunked) {
    ca.iter()
        .rev()
        .for_each(|opt_v| println!("{:?}", opt_v))
}

§Memory layout

ChunkedArrays use Apache Arrow as backend for the memory layout. Arrows memory is immutable which makes it possible to make multiple zero copy (sub)-views from a single array.

To be able to append data, Polars uses chunks to append new memory locations, hence the ChunkedArray<T> data structure. Appends are cheap, because it will not lead to a full reallocation of the whole array (as could be the case with a Rust Vec).

However, multiple chunks in a ChunkedArray will slow down many operations that need random access because we have an extra indirection and indexes need to be mapped to the proper chunk. Arithmetic may also be slowed down by this. When multiplying two ChunkedArrays with different chunk sizes they cannot utilize SIMD for instance.

If you want to have predictable performance (no unexpected re-allocation of memory), it is advised to call the ChunkedArray::rechunk after multiple append operations.

See also ChunkedArray::extend for appends within a chunk.

§Invariants

Implementations§

Source§

impl ChunkedArray<BooleanType>

Booleans are cast to 1 or 0.

Source

pub fn sum(&self) -> Option<IdxSize>

Source

pub fn min(&self) -> Option<bool>

Source

pub fn max(&self) -> Option<bool>

Source

pub fn mean(&self) -> Option<f64>

Source§

impl ChunkedArray<BinaryType>

Source

pub fn max_binary(&self) -> Option<&[u8]>

Source

pub fn min_binary(&self) -> Option<&[u8]>

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType<IsNested = FalseT, IsObject = FalseT>, for<'a> T::Physical<'a>: TotalOrd,

Source

pub fn append(&mut self, other: &Self) -> PolarsResult<()>

Append in place. This is done by adding the chunks of other to this ChunkedArray.

See also extend for appends to the underlying memory

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType,

Source

pub fn apply_nonnull_values_generic<'a, U, K, F>( &'a self, dtype: DataType, op: F, ) -> ChunkedArray<U>

Applies a function only to the non-null elements, propagating nulls.

Source

pub fn try_apply_nonnull_values_generic<'a, U, K, F, E>( &'a self, op: F, ) -> Result<ChunkedArray<U>, E>
where U: PolarsDataType, F: FnMut(T::Physical<'a>) -> Result<K, E>, U::Array: ArrayFromIter<K> + ArrayFromIter<Option<K>>,

Applies a function only to the non-null elements, propagating nulls.

Source

pub fn apply_into_string_amortized<'a, F>(&'a self, f: F) -> StringChunked
where F: FnMut(T::Physical<'a>, &mut String),

Source

pub fn try_apply_into_string_amortized<'a, F, E>( &'a self, f: F, ) -> Result<StringChunked, E>
where F: FnMut(T::Physical<'a>, &mut String) -> Result<(), E>,

Source§

impl<T: PolarsNumericType> ChunkedArray<T>

Source

pub fn cast_and_apply_in_place<F, S>(&self, f: F) -> ChunkedArray<S>
where F: Fn(S::Native) -> S::Native + Copy, S: PolarsNumericType,

Cast a numeric array to another numeric data type and apply a function in place. This saves an allocation.

Source

pub fn apply_in_place<F>(self, f: F) -> Self
where F: Fn(T::Native) -> T::Native + Copy,

Cast a numeric array to another numeric data type and apply a function in place. This saves an allocation.

Source§

impl<T: PolarsNumericType> ChunkedArray<T>

Source

pub fn apply_mut<F>(&mut self, f: F)
where F: Fn(T::Native) -> T::Native + Copy,

Source§

impl ChunkedArray<StringType>

Source

pub fn apply_mut<'a, F>(&'a self, f: F) -> Self
where F: FnMut(&'a str) -> &'a str,

Source§

impl ChunkedArray<BinaryType>

Source

pub fn apply_mut<'a, F>(&'a self, f: F) -> Self
where F: FnMut(&'a [u8]) -> &'a [u8],

Source§

impl ChunkedArray<StringType>

Source

pub unsafe fn apply_views<F: FnMut(View, &str) -> View + Copy>( &self, update_view: F, ) -> Self

§Safety

Update the views. All invariants of the views apply.

Source§

impl ChunkedArray<Float32Type>

Used to save compilation paths. Use carefully. Although this is safe, if misused it can lead to incorrect results.

Source

pub fn apply_as_ints<F>(&self, f: F) -> Series
where F: Fn(&Series) -> Series,

Source§

impl ChunkedArray<Float64Type>

Source

pub fn apply_as_ints<F>(&self, f: F) -> Series
where F: Fn(&Series) -> Series,

Source§

impl ChunkedArray<BooleanType>

Source

pub fn num_trues(&self) -> usize

Source

pub fn num_falses(&self) -> usize

Source§

impl<T: PolarsDataType> ChunkedArray<T>

Source

pub fn len(&self) -> usize

Get the length of the ChunkedArray

Source

pub fn null_count(&self) -> usize

Return the number of null values in the ChunkedArray.

Source

pub unsafe fn set_null_count(&mut self, null_count: IdxSize)

Set the null count directly.

This can be useful after mutably adjusting the validity of the underlying arrays.

§Safety

The new null count must match the total null count of the underlying arrays.

Source

pub fn is_empty(&self) -> bool

Check if ChunkedArray is empty.

Source

pub fn rechunk(&self) -> Self

Source

pub fn rechunk_validity(&self) -> Option<Bitmap>

Source

pub fn split_at(&self, offset: i64) -> (Self, Self)

Split the array. The chunks are reallocated the underlying data slices are zero copy.

When offset is negative it will be counted from the end of the array. This method will never error, and will slice the best match when offset, or length is out of bounds

Source

pub fn slice(&self, offset: i64, length: usize) -> Self

Slice the array. The chunks are reallocated the underlying data slices are zero copy.

When offset is negative it will be counted from the end of the array. This method will never error, and will slice the best match when offset, or length is out of bounds

Source

pub fn limit(&self, num_elements: usize) -> Self
where Self: Sized,

Take a view of top n elements

Source

pub fn head(&self, length: Option<usize>) -> Self
where Self: Sized,

Get the head of the ChunkedArray

Source

pub fn tail(&self, length: Option<usize>) -> Self
where Self: Sized,

Get the tail of the ChunkedArray

Source

pub fn prune_empty_chunks(&mut self)

Remove empty chunks.

Source§

impl ChunkedArray<StringType>

Source

pub fn to_decimal(&self, infer_length: usize) -> PolarsResult<Series>

Available on crate feature dtype-decimal only.

Convert an StringChunked to a Series of DataType::Decimal. Scale needed for the decimal type are inferred. Parsing is not strict.
Scale inference assumes that all tested strings are well-formed numbers, and may produce unexpected results for scale if this is not the case.

If the decimal precision and scale are already known, consider using the cast method.

Source§

impl<T> ChunkedArray<T>

Source

pub fn extend(&mut self, other: &Self) -> PolarsResult<()>

Extend the memory backed by this array with the values from other.

Different from ChunkedArray::append which adds chunks to this ChunkedArray extend appends the data from other to the underlying PrimitiveArray and thus may cause a reallocation.

However if this does not cause a reallocation, the resulting data structure will not have any extra chunks and thus will yield faster queries.

Prefer extend over append when you want to do a query after a single append. For instance during online operations where you add n rows and rerun a query.

Prefer append over extend when you want to append many times before doing a query. For instance when you read in multiple files and when to store them in a single DataFrame. In the latter case finish the sequence of append operations with a rechunk.

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType,

Source

pub fn for_each<'a, F>(&'a self, op: F)
where F: FnMut(Option<T::Physical<'a>>),

Source§

impl ChunkedArray<ListType>

Source

pub fn full_null_with_dtype( name: PlSmallStr, length: usize, inner_dtype: &DataType, ) -> ListChunked

Source§

impl ChunkedArray<UInt32Type>

Source

pub fn with_nullable_idx<T, F: FnOnce(&IdxCa) -> T>( idx: &[NullableIdxSize], f: F, ) -> T

Source§

impl<T: PolarsDataType> ChunkedArray<T>

Source

pub fn is_null(&self) -> BooleanChunked

Get a mask of the null values.

Source

pub fn is_not_null(&self) -> BooleanChunked

Get a mask of the valid values.

Source§

impl<T> ChunkedArray<T>

Source

pub fn rolling_map_float<F>( &self, window_size: usize, f: F, ) -> PolarsResult<Self>
where F: FnMut(&mut ChunkedArray<T>) -> Option<T::Native>,

Available on crate feature rolling_window only.

Apply a rolling custom function. This is pretty slow because of dynamic dispatch.

Source§

impl ChunkedArray<BinaryType>

Source

pub unsafe fn to_string_unchecked(&self) -> StringChunked

§Safety

String is not validated

Source§

impl ChunkedArray<StringType>

Source§

impl ChunkedArray<BooleanType>

Source

pub fn any(&self) -> bool

Returns whether any of the values in the column are true.

Null values are ignored.

Source

pub fn all(&self) -> bool

Returns whether all values in the array are true.

Null values are ignored.

Source

pub fn any_kleene(&self) -> Option<bool>

Returns whether any of the values in the column are true.

The output is unknown (None) if the array contains any null values and no true values.

Source

pub fn all_kleene(&self) -> Option<bool>

Returns whether all values in the column are true.

The output is unknown (None) if the array contains any null values and no false values.

Source§

impl<T> ChunkedArray<T>

Source

pub fn is_nan(&self) -> BooleanChunked

Source

pub fn is_not_nan(&self) -> BooleanChunked

Source

pub fn is_finite(&self) -> BooleanChunked

Source

pub fn is_infinite(&self) -> BooleanChunked

Source

pub fn none_to_nan(&self) -> Self

Convert missing values to NaN values.

Source§

impl<T> ChunkedArray<T>

Source

pub fn to_canonical(&self) -> Self

Source§

impl ChunkedArray<ListType>

Source

pub fn par_iter(&self) -> impl ParallelIterator<Item = Option<Series>> + '_

Source

pub fn par_iter_indexed( &mut self, ) -> impl IndexedParallelIterator<Item = Option<Series>> + '_

Source§

impl ChunkedArray<StringType>

Source

pub fn par_iter_indexed( &self, ) -> impl IndexedParallelIterator<Item = Option<&str>>

Source

pub fn par_iter(&self) -> impl ParallelIterator<Item = Option<&str>> + '_

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType,

Source

pub fn iter(&self) -> impl PolarsIterator<Item = Option<T::Physical<'_>>>

Source§

impl<T> ChunkedArray<T>

Source

pub fn to_ndarray(&self) -> PolarsResult<ArrayView1<'_, T::Native>>

Available on crate feature ndarray only.

If data is aligned in a single chunk and has no Null values a zero copy view is returned as an ndarray

Source§

impl ChunkedArray<ListType>

Source

pub fn to_ndarray<N>(&self) -> PolarsResult<Array2<N::Native>>

Available on crate feature ndarray only.

If all nested Series have the same length, a 2 dimensional ndarray::Array is returned.

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType, for<'a> <T::Array as StaticArray>::ValueT<'a>: AsRef<[u8]>,

Source

pub fn to_bytes_hashes<'a>( &'a self, multithreaded: bool, hb: PlRandomState, ) -> Vec<Vec<BytesHash<'a>>>

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType,

Source

pub fn with_chunk<A>(name: PlSmallStr, arr: A) -> Self
where A: Array, T: PolarsDataType<Array = A>,

Source

pub fn with_chunk_like<A>(ca: &Self, arr: A) -> Self
where A: Array, T: PolarsDataType<Array = A>,

Source

pub fn from_chunk_iter<I>(name: PlSmallStr, iter: I) -> Self
where I: IntoIterator, T: PolarsDataType<Array = <I as IntoIterator>::Item>, <I as IntoIterator>::Item: Array,

Source

pub fn from_chunk_iter_like<I>(ca: &Self, iter: I) -> Self
where I: IntoIterator, T: PolarsDataType<Array = <I as IntoIterator>::Item>, <I as IntoIterator>::Item: Array,

Source

pub fn try_from_chunk_iter<I, A, E>( name: PlSmallStr, iter: I, ) -> Result<Self, E>
where I: IntoIterator<Item = Result<A, E>>, T: PolarsDataType<Array = A>, A: Array,

Source

pub unsafe fn from_chunks(name: PlSmallStr, chunks: Vec<ArrayRef>) -> Self

Create a new ChunkedArray from existing chunks.

§Safety

The Arrow datatype of all chunks must match the PolarsDataType T.

Source

pub unsafe fn with_chunks(&self, chunks: Vec<ArrayRef>) -> Self

§Safety

The Arrow datatype of all chunks must match the PolarsDataType T.

Source

pub unsafe fn from_chunks_and_dtype( name: PlSmallStr, chunks: Vec<ArrayRef>, dtype: DataType, ) -> Self

Create a new ChunkedArray from existing chunks.

§Safety

The Arrow datatype of all chunks must match the PolarsDataType T.

Source

pub fn full_null_like(ca: &Self, length: usize) -> Self

Source§

impl<T> ChunkedArray<T>

Source

pub fn from_vec(name: PlSmallStr, v: Vec<T::Native>) -> Self

Create a new ChunkedArray by taking ownership of the Vec. This operation is zero copy.

Source

pub fn from_vec_validity( name: PlSmallStr, values: Vec<T::Native>, buffer: Option<Bitmap>, ) -> Self

Create a new ChunkedArray from a Vec and a validity mask.

Source

pub unsafe fn mmap_slice(name: PlSmallStr, values: &[T::Native]) -> Self

Create a temporary ChunkedArray from a slice.

§Safety

The lifetime will be bound to the lifetime of the slice. This will not be checked by the borrowchecker.

Source§

impl ChunkedArray<BooleanType>

Source

pub unsafe fn mmap_slice( name: PlSmallStr, values: &[u8], offset: usize, len: usize, ) -> Self

Create a temporary ChunkedArray from a slice.

§Safety

The lifetime will be bound to the lifetime of the slice. This will not be checked by the borrowchecker.

Source§

impl ChunkedArray<ListType>

Source

pub fn amortized_iter( &self, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>

This is an iterator over a ListChunked that saves allocations. A Series is: 1. Arc<ChunkedArray> ChunkedArray is: 2. Vec< 3. ArrayRef>

The ArrayRef we indicated with 3. will be updated during iteration. The Series will be pinned in memory, saving an allocation for

  1. Arc<..>
  2. Vec<…>

If the returned AmortSeries is cloned, the local copy will be replaced and a new container will be set.

Source

pub fn amortized_iter_with_name( &self, name: PlSmallStr, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>

See amortized_iter.

Source

pub fn apply_amortized_generic<F, K, V>(&self, f: F) -> ChunkedArray<V>

Apply a closure F elementwise.

Source

pub fn try_apply_amortized_generic<F, K, V>( &self, f: F, ) -> PolarsResult<ChunkedArray<V>>

Source

pub fn for_each_amortized<F>(&self, f: F)

Source

pub fn zip_and_apply_amortized<'a, T, I, F>( &'a self, ca: &'a ChunkedArray<T>, f: F, ) -> Self
where T: PolarsDataType, &'a ChunkedArray<T>: IntoIterator<IntoIter = I>, I: TrustedLen<Item = Option<T::Physical<'a>>>, F: FnMut(Option<AmortSeries>, Option<T::Physical<'a>>) -> Option<Series>,

Zip with a ChunkedArray then apply a binary function F elementwise.

Source

pub fn binary_zip_and_apply_amortized<'a, T, U, F>( &'a self, ca1: &'a ChunkedArray<T>, ca2: &'a ChunkedArray<U>, f: F, ) -> Self

Source

pub fn try_zip_and_apply_amortized<'a, T, I, F>( &'a self, ca: &'a ChunkedArray<T>, f: F, ) -> PolarsResult<Self>
where T: PolarsDataType, &'a ChunkedArray<T>: IntoIterator<IntoIter = I>, I: TrustedLen<Item = Option<T::Physical<'a>>>, F: FnMut(Option<AmortSeries>, Option<T::Physical<'a>>) -> PolarsResult<Option<Series>>,

Source

pub fn apply_amortized<F>(&self, f: F) -> Self
where F: FnMut(AmortSeries) -> Series,

Apply a closure F elementwise.

Source

pub fn try_apply_amortized<F>(&self, f: F) -> PolarsResult<Self>

Source§

impl ChunkedArray<ListType>

Source

pub fn inner_dtype(&self) -> &DataType

Get the inner data type of the list.

Source

pub fn set_inner_dtype(&mut self, dtype: DataType)

Source

pub fn set_fast_explode(&mut self)

Source

pub fn _can_fast_explode(&self) -> bool

Source

pub unsafe fn to_logical(&mut self, inner_dtype: DataType)

Set the logical type of the ListChunked.

§Safety

The caller must ensure that the logical type given fits the physical type of the array.

Source

pub fn get_inner(&self) -> Series

Get the inner values as Series, ignoring the list offsets.

Source

pub fn apply_to_inner( &self, func: &dyn Fn(Series) -> PolarsResult<Series>, ) -> PolarsResult<ListChunked>

Ignore the list indices and apply func to the inner type as Series.

Source

pub fn rechunk_and_trim_to_normalized_offsets(&self) -> Self

Source§

impl ChunkedArray<Int128Type>

Source

pub fn into_decimal_unchecked( self, precision: Option<usize>, scale: usize, ) -> DecimalChunked

Available on crate feature dtype-decimal only.
Source

pub fn into_decimal( self, precision: Option<usize>, scale: usize, ) -> PolarsResult<DecimalChunked>

Available on crate feature dtype-decimal only.
Source§

impl<T> ChunkedArray<ObjectType<T>>
where T: PolarsObject,

Source

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

Available on crate feature object only.
Source

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

Available on crate feature object only.
Source

pub fn new_empty(name: PlSmallStr) -> Self

Available on crate feature object only.
Source§

impl<T> ChunkedArray<ObjectType<T>>
where T: PolarsObject,

Source

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

Available on crate feature object only.

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>

Available on crate feature object only.

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

Source§

impl<T> ChunkedArray<T>

Source

pub fn init_rand(size: usize, null_density: f32, seed: Option<u64>) -> Self

Available on crate feature random only.
Source§

impl<T> ChunkedArray<T>

Source

pub fn sample_n( &self, n: usize, with_replacement: bool, shuffle: bool, seed: Option<u64>, ) -> PolarsResult<Self>

Available on crate feature random only.

Sample n datapoints from this ChunkedArray.

Source

pub fn sample_frac( &self, frac: f64, with_replacement: bool, shuffle: bool, seed: Option<u64>, ) -> PolarsResult<Self>

Available on crate feature random only.

Sample a fraction between 0.0-1.0 of this ChunkedArray.

Source§

impl<T> ChunkedArray<T>

Source

pub fn rand_normal( name: PlSmallStr, length: usize, mean: f64, std_dev: f64, ) -> PolarsResult<Self>

Available on crate feature random only.

Create ChunkedArray with samples from a Normal distribution.

Source

pub fn rand_standard_normal(name: PlSmallStr, length: usize) -> Self

Available on crate feature random only.

Create ChunkedArray with samples from a Standard Normal distribution.

Source

pub fn rand_uniform( name: PlSmallStr, length: usize, low: f64, high: f64, ) -> Self

Available on crate feature random only.

Create ChunkedArray with samples from a Uniform distribution.

Source§

impl ChunkedArray<BooleanType>

Source

pub fn rand_bernoulli( name: PlSmallStr, length: usize, p: f64, ) -> PolarsResult<Self>

Available on crate feature random only.

Create ChunkedArray with samples from a Bernoulli distribution.

Source§

impl<T: PolarsNumericType> ChunkedArray<T>

Source

pub fn to_vec(&self) -> Vec<Option<T::Native>>

Convert to a Vec of Option<T::Native>.

Source

pub fn to_vec_null_aware( &self, ) -> Either<Vec<T::Native>, Vec<Option<T::Native>>>

Convert to a Vec but don’t return Option<T::Native> if there are no null values

Source§

impl<T: PolarsDataType> ChunkedArray<T>

Source

pub fn metadata_dyn(&self) -> Option<RwLockReadGuard<'_, dyn MetadataTrait>>

Attempt to get a reference to the trait object containing the ChunkedArray’s Metadata

This fails if there is a need to block.

Source

pub fn boxed_metadata_dyn<'a>(&'a self) -> Box<dyn MetadataTrait + 'a>

Attempt to get a reference to the trait object containing the ChunkedArray’s Metadata

This fails if there is a need to block.

Source§

impl<T: PolarsDataType> ChunkedArray<T>

Source

pub unsafe fn new_with_dims( field: Arc<Field>, chunks: Vec<ArrayRef>, length: IdxSize, null_count: IdxSize, ) -> Self

Create a new ChunkedArray and explicitly set its length and null_count.

§Safety

The length and null_count must be correct.

Source

pub fn metadata(&self) -> MetadataReadGuard<'_, T>

Get a guard to read the ChunkedArray’s Metadata

Source

pub fn interior_mut_metadata(&self) -> RwLockWriteGuard<'_, Metadata<T>>

Get a guard to read/write the ChunkedArray’s Metadata

Source

pub fn metadata_arc(&self) -> &Arc<IMMetadata<T>>

Get a reference to Arc that contains the ChunkedArray’s Metadata

Source

pub fn metadata_owned_arc(&self) -> Arc<IMMetadata<T>>

Get a Arc that contains the ChunkedArray’s Metadata

Source

pub fn metadata_mut(&mut self) -> &mut Arc<IMMetadata<T>>

Get a mutable reference to the Arc that contains the ChunkedArray’s Metadata

Source

pub fn unset_fast_explode_list(&mut self)

Source

pub fn set_fast_explode_list(&mut self, value: bool)

Source

pub fn get_fast_explode_list(&self) -> bool

Source

pub fn get_flags(&self) -> MetadataFlags

Source

pub fn is_sorted_flag(&self) -> IsSorted

Source

pub fn set_sorted_flag(&mut self, sorted: IsSorted)

Set the ‘sorted’ bit meta info.

Source

pub fn with_sorted_flag(&self, sorted: IsSorted) -> Self

Set the ‘sorted’ bit meta info.

Source

pub fn get_min_value(&self) -> Option<T::OwnedPhysical>

Source

pub fn get_max_value(&self) -> Option<T::OwnedPhysical>

Source

pub fn get_distinct_count(&self) -> Option<IdxSize>

Source

pub fn merge_metadata(&mut self, md: Metadata<T>)

Source

pub fn copy_metadata_cast<O: PolarsDataType>( &mut self, other: &ChunkedArray<O>, props: MetadataProperties, )

Copies Metadata properties specified by props from other with different underlying PolarsDataType into self.

This does not copy the properties with a different type between the Metadatas (e.g. min_value and max_value) and will panic on debug builds if that is attempted.

Source

pub fn copy_metadata(&mut self, other: &Self, props: MetadataProperties)

Copies Metadata properties specified by props from other into self.

Source

pub fn first_non_null(&self) -> Option<usize>

Get the index of the first non null value in this ChunkedArray.

Source

pub fn last_non_null(&self) -> Option<usize>

Get the index of the last non null value in this ChunkedArray.

Source

pub fn drop_nulls(&self) -> Self

Source

pub fn iter_validities( &self, ) -> Map<Iter<'_, ArrayRef>, fn(_: &ArrayRef) -> Option<&Bitmap>>

Get the buffer of bits representing null values

Source

pub fn has_nulls(&self) -> bool

Return if any the chunks in this ChunkedArray have nulls.

Source

pub fn shrink_to_fit(&mut self)

Shrink the capacity of this array to fit its length.

Source

pub fn clear(&self) -> Self

Source

pub fn unpack_series_matching_type( &self, series: &Series, ) -> PolarsResult<&ChunkedArray<T>>

Series to ChunkedArray<T>

Source

pub fn chunk_lengths(&self) -> ChunkLenIter<'_>

Returns an iterator over the lengths of the chunks of the array.

Source

pub fn chunks(&self) -> &Vec<ArrayRef>

A reference to the chunks

Source

pub unsafe fn chunks_mut(&mut self) -> &mut Vec<ArrayRef>

A mutable reference to the chunks

§Safety

The caller must ensure to not change the DataType or length of any of the chunks. And the null_count remains correct.

Source

pub fn is_optimal_aligned(&self) -> bool

Returns true if contains a single chunk and has no null values

Source

pub fn dtype(&self) -> &DataType

Get data type of ChunkedArray.

Source

pub fn name(&self) -> &PlSmallStr

Name of the ChunkedArray.

Source

pub fn ref_field(&self) -> &Field

Get a reference to the field.

Source

pub fn rename(&mut self, name: PlSmallStr)

Rename this ChunkedArray.

Source

pub fn with_name(self, name: PlSmallStr) -> Self

Return this ChunkedArray with a new name.

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType,

Source

pub fn get(&self, idx: usize) -> Option<T::Physical<'_>>

Get a single value from this ChunkedArray. If the return values is None this indicates a NULL value.

§Panics

This function will panic if idx is out of bounds.

Source

pub unsafe fn get_unchecked(&self, idx: usize) -> Option<T::Physical<'_>>

Get a single value from this ChunkedArray. If the return values is None this indicates a NULL value.

§Safety

It is the callers responsibility that the idx < self.len().

Source

pub unsafe fn value_unchecked(&self, idx: usize) -> T::Physical<'_>

Get a single value from this ChunkedArray. Null values are ignored and the returned value could be garbage if it was masked out by NULL. Note that the value always is initialized.

§Safety

It is the callers responsibility that the idx < self.len().

Source

pub fn first(&self) -> Option<T::Physical<'_>>

Source

pub fn last(&self) -> Option<T::Physical<'_>>

Source§

impl ChunkedArray<ListType>

Source

pub fn get_as_series(&self, idx: usize) -> Option<Series>

Source§

impl<T> ChunkedArray<T>
where T: PolarsDataType,

Source

pub fn layout(&self) -> ChunkedArrayLayout<'_, T>

Source§

impl<T> ChunkedArray<T>

Source

pub fn cont_slice(&self) -> PolarsResult<&[T::Native]>

Returns the values of the array as a contiguous slice.

Source

pub fn data_views(&self) -> impl DoubleEndedIterator<Item = &[T::Native]>

Get slices of the underlying arrow data. NOTE: null values should be taken into account by the user of these slices as they are handled separately

Source

pub fn into_no_null_iter( &self, ) -> impl '_ + Send + Sync + ExactSizeIterator<Item = T::Native> + DoubleEndedIterator + TrustedLen

Source§

impl<T> ChunkedArray<T>

Source

pub unsafe fn group_tuples_perfect( &self, num_groups: usize, multithreaded: bool, group_capacity: usize, ) -> GroupsProxy

Available on crate feature algorithm_group_by only.

Use the indexes as perfect groups.

§Safety

This ChunkedArray must contain each value in [0..num_groups) at least once, and nothing outside this range.

Source§

impl<T: PolarsNumericType> ChunkedArray<T>

Source

pub fn new_vec(name: PlSmallStr, v: Vec<T::Native>) -> Self

Specialization that prevents an allocation prefer this over ChunkedArray::new when you have a Vec<T::Native> and no null values.

Source§

impl<T> ChunkedArray<T>

We cannot override the left hand side behaviour. So we create a trait LhsNumOps. This allows for 1.add(&Series)

Source

pub fn lhs_sub<N: Num + NumCast>(&self, lhs: N) -> Self

Apply lhs - self

Source

pub fn lhs_div<N: Num + NumCast>(&self, lhs: N) -> Self

Apply lhs / self

Source

pub fn lhs_rem<N: Num + NumCast>(&self, lhs: N) -> Self

Apply lhs % self

Trait Implementations§

Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Add<N> for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: N) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Add<N> for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: N) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: PolarsNumericType> Add for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: PolarsNumericType> Add for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> AggList for ChunkedArray<T>

Available on crate feature algorithm_group_by only.
Source§

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

Safety Read more
Source§

impl<T: PolarsNumericType> ArithmeticChunked for &ChunkedArray<T>

Source§

type Scalar = <T as PolarsNumericType>::Native

Source§

type Out = ChunkedArray<T>

Source§

type TrueDivOut = ChunkedArray<<<T as PolarsNumericType>::Native as NumericNative>::TrueDivPolarsType>

Source§

fn wrapping_abs(self) -> Self::Out

Source§

fn wrapping_neg(self) -> Self::Out

Source§

fn wrapping_add(self, rhs: Self) -> Self::Out

Source§

fn wrapping_sub(self, rhs: Self) -> Self::Out

Source§

fn wrapping_mul(self, rhs: Self) -> Self::Out

Source§

fn wrapping_floor_div(self, rhs: Self) -> Self::Out

Source§

fn wrapping_trunc_div(self, rhs: Self) -> Self::Out

Source§

fn wrapping_mod(self, rhs: Self) -> Self::Out

Source§

fn wrapping_add_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_sub_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_sub_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn wrapping_mul_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_floor_div_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_floor_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn wrapping_trunc_div_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_trunc_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn wrapping_mod_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_mod_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn true_div(self, rhs: Self) -> Self::TrueDivOut

Source§

fn true_div_scalar(self, rhs: Self::Scalar) -> Self::TrueDivOut

Source§

fn true_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::TrueDivOut

Source§

fn legacy_div(self, rhs: Self) -> Self::Out

Source§

fn legacy_div_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn legacy_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

impl<T: PolarsNumericType> ArithmeticChunked for ChunkedArray<T>

Source§

type Scalar = <T as PolarsNumericType>::Native

Source§

type Out = ChunkedArray<T>

Source§

type TrueDivOut = ChunkedArray<<<T as PolarsNumericType>::Native as NumericNative>::TrueDivPolarsType>

Source§

fn wrapping_abs(self) -> Self::Out

Source§

fn wrapping_neg(self) -> Self::Out

Source§

fn wrapping_add(self, rhs: Self) -> Self::Out

Source§

fn wrapping_sub(self, rhs: Self) -> Self::Out

Source§

fn wrapping_mul(self, rhs: Self) -> Self::Out

Source§

fn wrapping_floor_div(self, rhs: Self) -> Self::Out

Source§

fn wrapping_trunc_div(self, rhs: Self) -> Self::Out

Source§

fn wrapping_mod(self, rhs: Self) -> Self::Out

Source§

fn wrapping_add_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_sub_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_sub_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn wrapping_mul_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_floor_div_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_floor_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn wrapping_trunc_div_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_trunc_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn wrapping_mod_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn wrapping_mod_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

fn true_div(self, rhs: Self) -> Self::TrueDivOut

Source§

fn true_div_scalar(self, rhs: Self::Scalar) -> Self::TrueDivOut

Source§

fn true_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::TrueDivOut

Source§

fn legacy_div(self, rhs: Self) -> Self::Out

Source§

fn legacy_div_scalar(self, rhs: Self::Scalar) -> Self::Out

Source§

fn legacy_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out

Source§

impl<T> AsMut<ChunkedArray<T>> for dyn SeriesTrait + '_
where T: 'static + PolarsDataType,

Source§

fn as_mut(&mut self) -> &mut ChunkedArray<T>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T: PolarsDataType> AsRef<ChunkedArray<T>> for ChunkedArray<T>

Source§

fn as_ref(&self) -> &ChunkedArray<T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + '_
where T: 'static + PolarsDataType,

Source§

fn as_ref(&self) -> &ChunkedArray<T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: PolarsDataType> AsRefDataType for ChunkedArray<T>

Source§

impl<T> BitAnd for &ChunkedArray<T>
where T: PolarsIntegerType, T::Native: BitAnd<Output = T::Native>,

Source§

type Output = ChunkedArray<T>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<T> BitOr for &ChunkedArray<T>
where T: PolarsIntegerType, T::Native: BitOr<Output = T::Native>,

Source§

type Output = ChunkedArray<T>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<T> BitXor for &ChunkedArray<T>
where T: PolarsIntegerType, T::Native: BitXor<Output = T::Native>,

Source§

type Output = ChunkedArray<T>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T> ChunkAgg<<T as PolarsNumericType>::Native> for ChunkedArray<T>
where T: PolarsNumericType, PrimitiveArray<T::Native>: for<'a> MinMaxKernel<Scalar<'a> = T::Native>, <T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native>,

Source§

fn sum(&self) -> Option<T::Native>

Aggregate the sum of the ChunkedArray. Returns None if not implemented for T. If the array is empty, 0 is returned
Source§

fn _sum_as_f64(&self) -> f64

Source§

fn min(&self) -> Option<T::Native>

Source§

fn max(&self) -> Option<T::Native>

Returns the maximum value in the array, according to the natural order. Returns None if the array is empty or only contains null values.
Source§

fn min_max(&self) -> Option<(T::Native, T::Native)>

Source§

fn mean(&self) -> Option<f64>

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

impl<T> ChunkAggSeries for ChunkedArray<T>
where T: PolarsNumericType, PrimitiveArray<T::Native>: for<'a> MinMaxKernel<Scalar<'a> = T::Native>, <T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native>, ChunkedArray<T>: IntoSeries,

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> ChunkAnyValue for ChunkedArray<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, <T as PolarsNumericType>::Native> for ChunkedArray<T>

Source§

type FuncRet = <T as PolarsNumericType>::Native

Source§

fn apply_values<F>(&'a self, f: F) -> Self
where F: Fn(T::Native) -> T::Native + 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<T::Native>) -> Option<T::Native> + 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<T::Native>, &V) -> V,

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

impl<T> ChunkApplyKernel<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T>

Source§

fn apply_kernel( &self, f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef, ) -> Self

Apply kernel and return result as a new ChunkedArray.
Source§

fn apply_kernel_cast<S>( &self, f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef, ) -> ChunkedArray<S>
where S: PolarsDataType,

Apply a kernel that outputs an array of different type.
Source§

impl<T> ChunkCast for ChunkedArray<T>

Source§

fn cast_with_options( &self, dtype: &DataType, options: CastOptions, ) -> PolarsResult<Series>

Source§

unsafe fn cast_unchecked(&self, dtype: &DataType) -> PolarsResult<Series>

Does not check if the cast is a valid one and may over/underflow Read more
Source§

fn cast(&self, dtype: &DataType) -> PolarsResult<Series>

Source§

impl ChunkCompareEq<&ChunkedArray<BinaryType>> for BinaryChunked

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn equal(&self, rhs: &BinaryChunked) -> BooleanChunked

Check for equality.
Source§

fn equal_missing(&self, rhs: &BinaryChunked) -> BooleanChunked

Check for equality where None == None.
Source§

fn not_equal(&self, rhs: &BinaryChunked) -> BooleanChunked

Check for inequality.
Source§

fn not_equal_missing(&self, rhs: &BinaryChunked) -> BooleanChunked

Check for inequality where None == None.
Source§

impl ChunkCompareEq<&ChunkedArray<BooleanType>> for BooleanChunked

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn equal(&self, rhs: &BooleanChunked) -> BooleanChunked

Check for equality.
Source§

fn equal_missing(&self, rhs: &BooleanChunked) -> BooleanChunked

Check for equality where None == None.
Source§

fn not_equal(&self, rhs: &BooleanChunked) -> BooleanChunked

Check for inequality.
Source§

fn not_equal_missing(&self, rhs: &BooleanChunked) -> BooleanChunked

Check for inequality where None == None.
Source§

impl ChunkCompareEq<&ChunkedArray<ListType>> for ListChunked

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn equal(&self, rhs: &ListChunked) -> BooleanChunked

Check for equality.
Source§

fn equal_missing(&self, rhs: &ListChunked) -> BooleanChunked

Check for equality where None == None.
Source§

fn not_equal(&self, rhs: &ListChunked) -> BooleanChunked

Check for inequality.
Source§

fn not_equal_missing(&self, rhs: &ListChunked) -> BooleanChunked

Check for inequality where None == None.
Source§

impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked

Available on crate feature dtype-categorical only.
Source§

type Item = Result<ChunkedArray<BooleanType>, PolarsError>

Source§

fn equal(&self, rhs: &StringChunked) -> Self::Item

Check for equality.
Source§

fn equal_missing(&self, rhs: &StringChunked) -> Self::Item

Check for equality where None == None.
Source§

fn not_equal(&self, rhs: &StringChunked) -> Self::Item

Check for inequality.
Source§

fn not_equal_missing(&self, rhs: &StringChunked) -> Self::Item

Check for inequality where None == None.
Source§

impl ChunkCompareEq<&ChunkedArray<StringType>> for StringChunked

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn equal(&self, rhs: &StringChunked) -> BooleanChunked

Check for equality.
Source§

fn equal_missing(&self, rhs: &StringChunked) -> BooleanChunked

Check for equality where None == None.
Source§

fn not_equal(&self, rhs: &StringChunked) -> BooleanChunked

Check for inequality.
Source§

fn not_equal_missing(&self, rhs: &StringChunked) -> BooleanChunked

Check for inequality where None == None.
Source§

impl<T> ChunkCompareEq<&ChunkedArray<T>> for ChunkedArray<T>
where T: PolarsNumericType, T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked

Check for equality.
Source§

fn equal_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked

Check for equality where None == None.
Source§

fn not_equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked

Check for inequality.
Source§

fn not_equal_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked

Check for inequality where None == None.
Source§

impl<T, Rhs> ChunkCompareEq<Rhs> for ChunkedArray<T>
where T: PolarsNumericType, Rhs: ToPrimitive, T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn equal(&self, rhs: Rhs) -> BooleanChunked

Check for equality.
Source§

fn equal_missing(&self, rhs: Rhs) -> BooleanChunked

Check for equality where None == None.
Source§

fn not_equal(&self, rhs: Rhs) -> BooleanChunked

Check for inequality.
Source§

fn not_equal_missing(&self, rhs: Rhs) -> BooleanChunked

Check for inequality where None == None.
Source§

impl ChunkCompareIneq<&ChunkedArray<BinaryType>> for BinaryChunked

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn lt(&self, rhs: &BinaryChunked) -> BooleanChunked

Less than comparison.
Source§

fn lt_eq(&self, rhs: &BinaryChunked) -> BooleanChunked

Less than or equal comparison
Source§

fn gt(&self, rhs: &Self) -> BooleanChunked

Greater than comparison.
Source§

fn gt_eq(&self, rhs: &Self) -> BooleanChunked

Greater than or equal comparison.
Source§

impl ChunkCompareIneq<&ChunkedArray<BooleanType>> for BooleanChunked

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn lt(&self, rhs: &BooleanChunked) -> BooleanChunked

Less than comparison.
Source§

fn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked

Less than or equal comparison
Source§

fn gt(&self, rhs: &Self) -> BooleanChunked

Greater than comparison.
Source§

fn gt_eq(&self, rhs: &Self) -> BooleanChunked

Greater than or equal comparison.
Source§

impl ChunkCompareIneq<&ChunkedArray<StringType>> for CategoricalChunked

Available on crate feature dtype-categorical only.
Source§

type Item = Result<ChunkedArray<BooleanType>, PolarsError>

Source§

fn gt(&self, rhs: &StringChunked) -> Self::Item

Greater than comparison.
Source§

fn gt_eq(&self, rhs: &StringChunked) -> Self::Item

Greater than or equal comparison.
Source§

fn lt(&self, rhs: &StringChunked) -> Self::Item

Less than comparison.
Source§

fn lt_eq(&self, rhs: &StringChunked) -> Self::Item

Less than or equal comparison
Source§

impl ChunkCompareIneq<&ChunkedArray<StringType>> for StringChunked

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn gt(&self, rhs: &StringChunked) -> BooleanChunked

Greater than comparison.
Source§

fn gt_eq(&self, rhs: &StringChunked) -> BooleanChunked

Greater than or equal comparison.
Source§

fn lt(&self, rhs: &StringChunked) -> BooleanChunked

Less than comparison.
Source§

fn lt_eq(&self, rhs: &StringChunked) -> BooleanChunked

Less than or equal comparison
Source§

impl<T> ChunkCompareIneq<&ChunkedArray<T>> for ChunkedArray<T>
where T: PolarsNumericType, T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn lt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked

Less than comparison.
Source§

fn lt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked

Less than or equal comparison
Source§

fn gt(&self, rhs: &Self) -> BooleanChunked

Greater than comparison.
Source§

fn gt_eq(&self, rhs: &Self) -> BooleanChunked

Greater than or equal comparison.
Source§

impl<T, Rhs> ChunkCompareIneq<Rhs> for ChunkedArray<T>
where T: PolarsNumericType, Rhs: ToPrimitive, T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,

Source§

type Item = ChunkedArray<BooleanType>

Source§

fn gt(&self, rhs: Rhs) -> BooleanChunked

Greater than comparison.
Source§

fn gt_eq(&self, rhs: Rhs) -> BooleanChunked

Greater than or equal comparison.
Source§

fn lt(&self, rhs: Rhs) -> BooleanChunked

Less than comparison.
Source§

fn lt_eq(&self, rhs: Rhs) -> BooleanChunked

Less than or equal comparison
Source§

impl<T: PolarsNumericType> ChunkExpandAtIndex<T> for ChunkedArray<T>

Source§

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

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

impl<T> ChunkFillNullValue<<T as PolarsNumericType>::Native> for ChunkedArray<T>

Source§

fn fill_null_with_values(&self, value: T::Native) -> PolarsResult<Self>

Replace None values with a give value T.
Source§

impl<T> ChunkFilter<T> for ChunkedArray<T>
where T: PolarsDataType<HasViews = FalseT, IsObject = FalseT>,

Source§

fn filter(&self, filter: &BooleanChunked) -> PolarsResult<ChunkedArray<T>>

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

impl<T> ChunkFull<<T as PolarsNumericType>::Native> for ChunkedArray<T>

Source§

fn full(name: PlSmallStr, value: T::Native, length: usize) -> Self

Create a ChunkedArray with a single value.
Source§

impl<T> ChunkFullNull for ChunkedArray<T>

Source§

fn full_null(name: PlSmallStr, length: usize) -> Self

Source§

impl<T> ChunkQuantile<f64> for ChunkedArray<T>

Source§

fn quantile( &self, quantile: f64, method: QuantileMethod, ) -> PolarsResult<Option<f64>>

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

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

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

impl<T> ChunkReverse for ChunkedArray<T>

Source§

fn reverse(&self) -> ChunkedArray<T>

Return a reversed version of this array.
Source§

impl<T> ChunkRollApply for ChunkedArray<T>
where T: PolarsNumericType, Self: IntoSeries,

Available on crate feature rolling_window only.
Source§

fn rolling_map( &self, f: &dyn Fn(&Series) -> Series, options: RollingOptionsFixedWindow, ) -> PolarsResult<Series>

Apply a rolling custom function. This is pretty slow because of dynamic dispatch.

Source§

impl<'a, T> ChunkSet<'a, <T as PolarsNumericType>::Native, <T as PolarsNumericType>::Native> for ChunkedArray<T>

Source§

fn scatter_single<I: IntoIterator<Item = IdxSize>>( &'a self, idx: I, value: Option<T::Native>, ) -> PolarsResult<Self>

Set the values at indexes idx to some optional value Option<T>. Read more
Source§

fn scatter_with<I: IntoIterator<Item = IdxSize>, F>( &'a self, idx: I, f: F, ) -> PolarsResult<Self>
where F: Fn(Option<T::Native>) -> Option<T::Native>,

Set the values at indexes idx by applying a closure to these values. Read more
Source§

fn set( &'a self, mask: &BooleanChunked, value: Option<T::Native>, ) -> PolarsResult<Self>

Set the values where the mask evaluates to true to some optional value Option<T>. Read more
Source§

impl<T> ChunkShift<T> for ChunkedArray<T>

Source§

fn shift(&self, periods: i64) -> ChunkedArray<T>

Source§

impl<T> ChunkShiftFill<T, Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>

Source§

fn shift_and_fill( &self, periods: i64, fill_value: Option<T::Native>, ) -> ChunkedArray<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> ChunkSort<T> for ChunkedArray<T>

Source§

fn arg_sort_multiple( &self, by: &[Column], options: &SortMultipleOptions, ) -> PolarsResult<IdxCa>

§Panics

This function is very opinionated. We assume that all numeric Series are of the same type, if not it will panic

Source§

fn sort_with(&self, options: SortOptions) -> ChunkedArray<T>

Source§

fn sort(&self, descending: bool) -> ChunkedArray<T>

Returned a sorted ChunkedArray.
Source§

fn arg_sort(&self, options: SortOptions) -> IdxCa

Retrieve the indexes needed to sort this array.
Source§

impl<T: PolarsDataType> ChunkTake<ChunkedArray<UInt32Type>> for ChunkedArray<T>

Source§

fn take(&self, indices: &IdxCa) -> PolarsResult<Self>

Gather values from ChunkedArray by index.

Source§

impl<T: PolarsDataType, I: AsRef<[IdxSize]> + ?Sized> ChunkTake<I> for ChunkedArray<T>

Source§

fn take(&self, indices: &I) -> PolarsResult<Self>

Gather values from ChunkedArray by index.

Source§

impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for BinaryChunked

Source§

unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self

Gather values from ChunkedArray by index.

Source§

impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ListChunked

Source§

unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self

Gather values from ChunkedArray by index. Read more
Source§

impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for StringChunked

Source§

unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self

Gather values from ChunkedArray by index. Read more
Source§

impl<T> ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ChunkedArray<T>
where T: PolarsDataType<HasViews = FalseT, IsStruct = FalseT, IsNested = FalseT> + PolarsDataType,

Source§

unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self

Gather values from ChunkedArray by index.

Source§

impl<T, I: AsRef<[IdxSize]> + ?Sized> ChunkTakeUnchecked<I> for ChunkedArray<T>
where T: PolarsDataType<HasViews = FalseT, IsStruct = FalseT, IsNested = FalseT> + PolarsDataType,

Source§

unsafe fn take_unchecked(&self, indices: &I) -> Self

Gather values from ChunkedArray by index.

Source§

impl<T> ChunkUnique for ChunkedArray<T>

Available on crate feature algorithm_group_by only.
Source§

fn unique(&self) -> PolarsResult<Self>

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> ChunkVar for ChunkedArray<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> ChunkZip<T> for ChunkedArray<T>
where T: PolarsDataType<IsStruct = FalseT>, T::Array: for<'a> IfThenElseKernel<Scalar<'a> = T::Physical<'a>>, ChunkedArray<T>: ChunkExpandAtIndex<T>,

Available on crate feature zip_with only.
Source§

fn zip_with( &self, mask: &BooleanChunked, other: &ChunkedArray<T>, ) -> PolarsResult<ChunkedArray<T>>

Create a new ChunkedArray with values from self where the mask evaluates true and values from other where the mask evaluates false
Source§

impl<T: PolarsDataType> Clone for ChunkedArray<T>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: PolarsDataType> Container for ChunkedArray<T>

Source§

fn slice(&self, offset: i64, len: usize) -> Self

Source§

fn split_at(&self, offset: i64) -> (Self, Self)

Source§

fn len(&self) -> usize

Source§

fn iter_chunks(&self) -> impl Iterator<Item = Self>

Source§

fn n_chunks(&self) -> usize

Source§

fn chunk_lengths(&self) -> impl Iterator<Item = usize>

Source§

impl Debug for ChunkedArray<BooleanType>

Source§

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

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

impl<T> Debug for ChunkedArray<T>

Source§

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

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

impl<T: PolarsDataType> Default for ChunkedArray<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Div<N> for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: N) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Div<N> for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: N) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: PolarsNumericType> Div for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: PolarsNumericType> Div for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: PolarsDataType> Drop for ChunkedArray<T>

Available on crate feature object only.
Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a, T> From<&'a ChunkedArray<T>> for Vec<Option<T::Physical<'a>>>
where T: PolarsDataType,

Source§

fn from(ca: &'a ChunkedArray<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, A> From<A> for ChunkedArray<T>
where T: PolarsDataType<Array = A>, A: Array,

Source§

fn from(arr: A) -> Self

Converts to this type from the input type.
Source§

impl From<ChunkedArray<BooleanType>> for Vec<Option<bool>>

Source§

fn from(ca: BooleanChunked) -> Self

Converts to this type from the input type.
Source§

impl From<ChunkedArray<StringType>> for Vec<Option<String>>

Source§

fn from(ca: StringChunked) -> Self

Converts to this type from the input type.
Source§

impl<T> From<ChunkedArray<T>> for Series

Source§

fn from(ca: ChunkedArray<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> FromIterator<(Vec<<T as PolarsNumericType>::Native>, Option<Bitmap>)> for ChunkedArray<T>

Source§

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

Creates a value from an iterator. Read more
Source§

impl<T> FromIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>

FromIterator trait

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<Option<bool>> for ChunkedArray<BooleanType>

Source§

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

Creates a value from an iterator. Read more
Source§

impl<T> FromIteratorReversed<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>

Source§

fn from_trusted_len_iter_rev<I: TrustedLen<Item = Option<T::Native>>>( iter: I, ) -> Self

Source§

impl<T> FromParallelIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>

Source§

fn from_par_iter<I: IntoParallelIterator<Item = Option<T::Native>>>( iter: I, ) -> Self

Creates an instance of the collection from the parallel iterator par_iter. Read more
Source§

impl<T> FromTrustedLenIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>

Source§

fn from_iter_trusted_length<I: IntoIterator<Item = Option<T::Native>>>( iter: I, ) -> Self
where I::IntoIter: TrustedLen,

Source§

impl FromTrustedLenIterator<Option<bool>> for ChunkedArray<BooleanType>

Source§

fn from_iter_trusted_length<I: IntoIterator<Item = Option<bool>>>( iter: I, ) -> Self
where I::IntoIter: TrustedLen,

Source§

impl<T> IntoGroupsProxy for ChunkedArray<T>

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 ChunkedArray<T>

Source§

type Item = Option<<T as PolarsNumericType>::Native>

The type of the elements being iterated over.
Source§

type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<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: PolarsDataType + 'static> IntoSeries for ChunkedArray<T>
where SeriesWrap<ChunkedArray<T>>: SeriesTrait,

Source§

fn into_series(self) -> Series
where Self: Sized,

Source§

fn is_series() -> bool

Source§

impl<T> MetadataCollectable<T> for ChunkedArray<T>

Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Mul<N> for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: N) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Mul<N> for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: N) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: PolarsNumericType> Mul for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: PolarsNumericType> Mul for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl NamedFrom<Range<i32>, Int32Type> for ChunkedArray<Int32Type>

Source§

fn new(name: PlSmallStr, range: Range<i32>) -> Self

Initialize by name and values.
Source§

impl NamedFrom<Range<i64>, Int64Type> for ChunkedArray<Int64Type>

Source§

fn new(name: PlSmallStr, range: Range<i64>) -> Self

Initialize by name and values.
Source§

impl NamedFrom<Range<u32>, UInt32Type> for ChunkedArray<UInt32Type>

Source§

fn new(name: PlSmallStr, range: Range<u32>) -> Self

Initialize by name and values.
Source§

impl NamedFrom<Range<u64>, UInt64Type> for ChunkedArray<UInt64Type>

Source§

fn new(name: PlSmallStr, range: Range<u64>) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<String>]>> NamedFrom<T, [Option<String>]> for ChunkedArray<StringType>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<Vec<u8>>]>> NamedFrom<T, [Option<Vec<u8>>]> for ChunkedArray<BinaryType>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<bool>]>> NamedFrom<T, [Option<bool>]> for ChunkedArray<BooleanType>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<f32>]>> NamedFrom<T, [Option<f32>]> for ChunkedArray<Float32Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<f64>]>> NamedFrom<T, [Option<f64>]> for ChunkedArray<Float64Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<i128>]>> NamedFrom<T, [Option<i128>]> for ChunkedArray<Int128Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<i32>]>> NamedFrom<T, [Option<i32>]> for ChunkedArray<Int32Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<i64>]>> NamedFrom<T, [Option<i64>]> for ChunkedArray<Int64Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<u32>]>> NamedFrom<T, [Option<u32>]> for ChunkedArray<UInt32Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Option<u64>]>> NamedFrom<T, [Option<u64>]> for ChunkedArray<UInt64Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[String]>> NamedFrom<T, [String]> for ChunkedArray<StringType>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[Vec<u8>]>> NamedFrom<T, [Vec<u8>]> for ChunkedArray<BinaryType>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[bool]>> NamedFrom<T, [bool]> for ChunkedArray<BooleanType>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[f32]>> NamedFrom<T, [f32]> for ChunkedArray<Float32Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[f64]>> NamedFrom<T, [f64]> for ChunkedArray<Float64Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[i128]>> NamedFrom<T, [i128]> for ChunkedArray<Int128Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[i32]>> NamedFrom<T, [i32]> for ChunkedArray<Int32Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[i64]>> NamedFrom<T, [i64]> for ChunkedArray<Int64Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[u32]>> NamedFrom<T, [u32]> for ChunkedArray<UInt32Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T: AsRef<[u64]>> NamedFrom<T, [u64]> for ChunkedArray<UInt64Type>

Source§

fn new(name: PlSmallStr, v: T) -> Self

Initialize by name and values.
Source§

impl<T> NewChunkedArray<T, <T as PolarsNumericType>::Native> for ChunkedArray<T>

Source§

fn from_iter_values( name: PlSmallStr, it: impl Iterator<Item = T::Native>, ) -> ChunkedArray<T>

Create a new ChunkedArray from an iterator.

Source§

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

Source§

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

Source§

fn from_iter_options( name: PlSmallStr, it: impl Iterator<Item = Option<T::Native>>, ) -> ChunkedArray<T>

Create a new ChunkedArray from an iterator.
Source§

impl<T: NumOpsDispatchInner> NumOpsDispatch for ChunkedArray<T>

Source§

impl<S: NumOpsDispatchCheckedInner> NumOpsDispatchChecked for ChunkedArray<S>

Available on crate feature checked_arithmetic only.
Source§

fn checked_div(&self, rhs: &Series) -> PolarsResult<Series>

Checked integer division. Computes self / rhs, returning None if rhs == 0 or the division results in overflow.
Source§

fn checked_div_num<T: ToPrimitive>(&self, rhs: T) -> PolarsResult<Series>

Source§

impl<T> QuantileAggSeries for ChunkedArray<T>
where T: PolarsIntegerType, T::Native: Ord, <T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native>,

Source§

fn quantile_reduce( &self, quantile: f64, method: QuantileMethod, ) -> PolarsResult<Scalar>

Get the quantile of the ChunkedArray as a new Series of length 1.
Source§

fn median_reduce(&self) -> Scalar

Get the median of the ChunkedArray as a new Series of length 1.
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Rem<N> for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: N) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Rem<N> for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: N) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: PolarsNumericType> Rem for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: PolarsNumericType> Rem for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Sub<N> for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: N) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: PolarsNumericType, N: Num + ToPrimitive> Sub<N> for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: N) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: PolarsNumericType> Sub for &ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: PolarsNumericType> Sub for ChunkedArray<T>

Source§

type Output = ChunkedArray<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> VarAggSeries for ChunkedArray<T>

Source§

fn var_reduce(&self, ddof: u8) -> Scalar

Get the variance of the ChunkedArray as a new Series of length 1.
Source§

fn std_reduce(&self, ddof: u8) -> Scalar

Get the standard deviation of the ChunkedArray as a new Series of length 1.

Auto Trait Implementations§

§

impl<T> Freeze for ChunkedArray<T>

§

impl<T> !RefUnwindSafe for ChunkedArray<T>

§

impl<T> Send for ChunkedArray<T>

§

impl<T> Sync for ChunkedArray<T>

§

impl<T> Unpin for ChunkedArray<T>

§

impl<T> !UnwindSafe for ChunkedArray<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<I, C> CompactStringExt for C
where I: AsRef<str>, &'a C: for<'a> IntoIterator<Item = &'a I>,

Source§

fn concat_compact(&self) -> CompactString

Concatenates all the items of a collection into a CompactString Read more
Source§

fn join_compact<S>(&self, separator: S) -> CompactString
where S: AsRef<str>,

Joins all the items of a collection, placing a separator between them, forming a CompactString Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoColumn for T
where T: IntoSeries,

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,