pub struct ChunkedArray<T: PolarsDataType> { /* private fields */ }
Expand description
§ChunkedArray
Every Series contains a ChunkedArray<T>
. Unlike Series
, ChunkedArray
s 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
ChunkedArray
s 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
ChunkedArray
s 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 ChunkedArray
s 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
- A
ChunkedArray
should always have at least a singleArrayRef
. - The
PolarsDataType
T
should always map to the correctArrowDataType
in theArrayRef
chunks. - Nested datatypes such as
List
andArray
store the physical types instead of the logical type given by the datatype.
Implementations§
Source§impl ChunkedArray<BooleanType>
impl ChunkedArray<BooleanType>
Booleans are cast to 1 or 0.
Source§impl ChunkedArray<BinaryType>
impl ChunkedArray<BinaryType>
pub fn max_binary(&self) -> Option<&[u8]>
pub fn min_binary(&self) -> Option<&[u8]>
Source§impl<T> ChunkedArray<T>
impl<T> ChunkedArray<T>
Sourcepub fn append(&mut self, other: &Self) -> PolarsResult<()>
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,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
Sourcepub fn apply_nonnull_values_generic<'a, U, K, F>(
&'a self,
dtype: DataType,
op: F,
) -> ChunkedArray<U>where
U: PolarsDataType,
F: FnMut(T::Physical<'a>) -> K,
U::Array: ArrayFromIterDtype<K> + ArrayFromIterDtype<Option<K>>,
pub fn apply_nonnull_values_generic<'a, U, K, F>(
&'a self,
dtype: DataType,
op: F,
) -> ChunkedArray<U>where
U: PolarsDataType,
F: FnMut(T::Physical<'a>) -> K,
U::Array: ArrayFromIterDtype<K> + ArrayFromIterDtype<Option<K>>,
Applies a function only to the non-null elements, propagating nulls.
Sourcepub 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>>,
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.
pub fn apply_into_string_amortized<'a, F>(&'a self, f: F) -> StringChunked
pub fn try_apply_into_string_amortized<'a, F, E>( &'a self, f: F, ) -> Result<StringChunked, E>
Source§impl<T: PolarsNumericType> ChunkedArray<T>
impl<T: PolarsNumericType> ChunkedArray<T>
Sourcepub fn cast_and_apply_in_place<F, S>(&self, f: F) -> ChunkedArray<S>
pub fn cast_and_apply_in_place<F, S>(&self, f: F) -> ChunkedArray<S>
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>
impl<T: PolarsNumericType> ChunkedArray<T>
Source§impl ChunkedArray<Float32Type>
impl ChunkedArray<Float32Type>
Used to save compilation paths. Use carefully. Although this is safe, if misused it can lead to incorrect results.
Source§impl<T: PolarsDataType> ChunkedArray<T>
impl<T: PolarsDataType> ChunkedArray<T>
Sourcepub fn null_count(&self) -> usize
pub fn null_count(&self) -> usize
Return the number of null values in the ChunkedArray.
Sourcepub unsafe fn set_null_count(&mut self, null_count: usize)
pub unsafe fn set_null_count(&mut self, null_count: usize)
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.
pub fn rechunk(&self) -> Self
pub fn rechunk_validity(&self) -> Option<Bitmap>
Sourcepub fn split_at(&self, offset: i64) -> (Self, Self)
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
Sourcepub fn slice(&self, offset: i64, length: usize) -> Self
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
Sourcepub fn limit(&self, num_elements: usize) -> Selfwhere
Self: Sized,
pub fn limit(&self, num_elements: usize) -> Selfwhere
Self: Sized,
Take a view of top n elements
Sourcepub fn head(&self, length: Option<usize>) -> Selfwhere
Self: Sized,
pub fn head(&self, length: Option<usize>) -> Selfwhere
Self: Sized,
Get the head of the ChunkedArray
Sourcepub fn tail(&self, length: Option<usize>) -> Selfwhere
Self: Sized,
pub fn tail(&self, length: Option<usize>) -> Selfwhere
Self: Sized,
Get the tail of the ChunkedArray
Sourcepub fn prune_empty_chunks(&mut self)
pub fn prune_empty_chunks(&mut self)
Remove empty chunks.
Source§impl ChunkedArray<StringType>
impl ChunkedArray<StringType>
Sourcepub fn to_decimal(&self, infer_length: usize) -> PolarsResult<Series>
Available on crate feature dtype-decimal
only.
pub fn to_decimal(&self, infer_length: usize) -> PolarsResult<Series>
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>where
T: PolarsNumericType,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
Sourcepub fn extend(&mut self, other: &Self) -> PolarsResult<()>
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,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
Source§impl ChunkedArray<FixedSizeListType>
impl ChunkedArray<FixedSizeListType>
pub fn full_null_with_dtype( name: PlSmallStr, length: usize, inner_dtype: &DataType, width: usize, ) -> ArrayChunked
dtype-array
only.Source§impl ChunkedArray<ListType>
impl ChunkedArray<ListType>
pub fn full_null_with_dtype( name: PlSmallStr, length: usize, inner_dtype: &DataType, ) -> ListChunked
Source§impl ChunkedArray<UInt32Type>
impl ChunkedArray<UInt32Type>
pub fn with_nullable_idx<T, F: FnOnce(&IdxCa) -> T>( idx: &[NullableIdxSize], f: F, ) -> T
Source§impl<T: PolarsDataType> ChunkedArray<T>
impl<T: PolarsDataType> ChunkedArray<T>
Sourcepub fn is_null(&self) -> BooleanChunked
pub fn is_null(&self) -> BooleanChunked
Get a mask of the null values.
Sourcepub fn is_not_null(&self) -> BooleanChunked
pub fn is_not_null(&self) -> BooleanChunked
Get a mask of the valid values.
Source§impl<T> ChunkedArray<T>where
ChunkedArray<T>: IntoSeries,
T: PolarsFloatType,
T::Native: Float + IsFloat + SubAssign + Pow<T::Native, Output = T::Native>,
impl<T> ChunkedArray<T>where
ChunkedArray<T>: IntoSeries,
T: PolarsFloatType,
T::Native: Float + IsFloat + SubAssign + Pow<T::Native, Output = T::Native>,
Sourcepub fn rolling_map_float<F>(
&self,
window_size: usize,
f: F,
) -> PolarsResult<Self>
Available on crate feature rolling_window
only.
pub fn rolling_map_float<F>( &self, window_size: usize, f: F, ) -> PolarsResult<Self>
rolling_window
only.Apply a rolling custom function. This is pretty slow because of dynamic dispatch.
Source§impl ChunkedArray<BinaryType>
impl ChunkedArray<BinaryType>
Sourcepub unsafe fn to_string_unchecked(&self) -> StringChunked
pub unsafe fn to_string_unchecked(&self) -> StringChunked
§Safety
String is not validated
Source§impl ChunkedArray<StringType>
impl ChunkedArray<StringType>
pub fn as_binary(&self) -> BinaryChunked
Source§impl ChunkedArray<BooleanType>
impl ChunkedArray<BooleanType>
Sourcepub fn any(&self) -> bool
pub fn any(&self) -> bool
Returns whether any of the values in the column are true
.
Null values are ignored.
Sourcepub fn all(&self) -> bool
pub fn all(&self) -> bool
Returns whether all values in the array are true
.
Null values are ignored.
Sourcepub fn any_kleene(&self) -> Option<bool>
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.
Sourcepub fn all_kleene(&self) -> Option<bool>
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>
impl<T> ChunkedArray<T>
pub fn is_nan(&self) -> BooleanChunked
pub fn is_not_nan(&self) -> BooleanChunked
pub fn is_finite(&self) -> BooleanChunked
pub fn is_infinite(&self) -> BooleanChunked
Sourcepub fn none_to_nan(&self) -> Self
pub fn none_to_nan(&self) -> Self
Convert missing values to NaN
values.
Source§impl<T> ChunkedArray<T>
impl<T> ChunkedArray<T>
pub fn to_canonical(&self) -> Self
Source§impl ChunkedArray<ListType>
impl ChunkedArray<ListType>
pub fn par_iter(&self) -> impl ParallelIterator<Item = Option<Series>> + '_
pub fn par_iter_indexed( &mut self, ) -> impl IndexedParallelIterator<Item = Option<Series>> + '_
Source§impl ChunkedArray<StringType>
impl ChunkedArray<StringType>
pub fn par_iter_indexed( &self, ) -> impl IndexedParallelIterator<Item = Option<&str>>
pub fn par_iter(&self) -> impl ParallelIterator<Item = Option<&str>> + '_
Source§impl<T> ChunkedArray<T>where
T: PolarsDataType,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
pub fn iter(&self) -> impl PolarsIterator<Item = Option<T::Physical<'_>>>
Source§impl<T> ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
Sourcepub fn to_ndarray(&self) -> PolarsResult<ArrayView1<'_, T::Native>>
Available on crate feature ndarray
only.
pub fn to_ndarray(&self) -> PolarsResult<ArrayView1<'_, T::Native>>
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>
impl ChunkedArray<ListType>
Sourcepub fn to_ndarray<N>(&self) -> PolarsResult<Array2<N::Native>>where
N: PolarsNumericType,
Available on crate feature ndarray
only.
pub fn to_ndarray<N>(&self) -> PolarsResult<Array2<N::Native>>where
N: PolarsNumericType,
ndarray
only.If all nested Series
have the same length, a 2 dimensional ndarray::Array
is returned.
Source§impl ChunkedArray<FixedSizeListType>
impl ChunkedArray<FixedSizeListType>
Sourcepub fn amortized_iter(
&self,
) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>
Available on crate feature dtype-array
only.
pub fn amortized_iter( &self, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>
dtype-array
only.This is an iterator over a ArrayChunked
that save 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
- Arc<..>
- Vec<…>
§Warning
Though memory safe in the sense that it will not read unowned memory, UB, or memory leaks
this function still needs precautions. The returned should never be cloned or taken longer
than a single iteration, as every call on next
of the iterator will change the contents of
that Series.
§Safety
The lifetime of AmortSeries is bound to the iterator. Keeping it alive longer than the iterator is UB.
Sourcepub fn amortized_iter_with_name(
&self,
name: PlSmallStr,
) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>
Available on crate feature dtype-array
only.
pub fn amortized_iter_with_name( &self, name: PlSmallStr, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>
dtype-array
only.This is an iterator over a ArrayChunked
that save 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
- Arc<..>
- Vec<…>
If the returned AmortSeries
is cloned, the local copy will be replaced and a new container
will be set.
pub fn try_apply_amortized_to_list<F>(&self, f: F) -> PolarsResult<ListChunked>
dtype-array
only.Sourcepub unsafe fn apply_amortized_same_type<F>(&self, f: F) -> Self
Available on crate feature dtype-array
only.
pub unsafe fn apply_amortized_same_type<F>(&self, f: F) -> Self
dtype-array
only.Apply a closure F
to each array.
§Safety
Return series of F
must has the same dtype and number of elements as input.
Sourcepub unsafe fn try_apply_amortized_same_type<F>(
&self,
f: F,
) -> PolarsResult<Self>
Available on crate feature dtype-array
only.
pub unsafe fn try_apply_amortized_same_type<F>( &self, f: F, ) -> PolarsResult<Self>
dtype-array
only.Try apply a closure F
to each array.
§Safety
Return series of F
must has the same dtype and number of elements as input if it is Ok.
Sourcepub unsafe fn zip_and_apply_amortized_same_type<'a, T, F>(
&'a self,
ca: &'a ChunkedArray<T>,
f: F,
) -> Self
Available on crate feature dtype-array
only.
pub unsafe fn zip_and_apply_amortized_same_type<'a, T, F>( &'a self, ca: &'a ChunkedArray<T>, f: F, ) -> Self
dtype-array
only.Zip with a ChunkedArray
then apply a binary function F
elementwise.
§Safety
Sourcepub fn apply_amortized_generic<F, K, V>(&self, f: F) -> ChunkedArray<V>where
V: PolarsDataType,
F: FnMut(Option<AmortSeries>) -> Option<K> + Copy,
V::Array: ArrayFromIter<Option<K>>,
Available on crate feature dtype-array
only.
pub fn apply_amortized_generic<F, K, V>(&self, f: F) -> ChunkedArray<V>where
V: PolarsDataType,
F: FnMut(Option<AmortSeries>) -> Option<K> + Copy,
V::Array: ArrayFromIter<Option<K>>,
dtype-array
only.Apply a closure F
elementwise.
Sourcepub fn try_apply_amortized_generic<F, K, V>(
&self,
f: F,
) -> PolarsResult<ChunkedArray<V>>where
V: PolarsDataType,
F: FnMut(Option<AmortSeries>) -> PolarsResult<Option<K>> + Copy,
V::Array: ArrayFromIter<Option<K>>,
Available on crate feature dtype-array
only.
pub fn try_apply_amortized_generic<F, K, V>(
&self,
f: F,
) -> PolarsResult<ChunkedArray<V>>where
V: PolarsDataType,
F: FnMut(Option<AmortSeries>) -> PolarsResult<Option<K>> + Copy,
V::Array: ArrayFromIter<Option<K>>,
dtype-array
only.Try apply a closure F
elementwise.
pub fn for_each_amortized<F>(&self, f: F)
dtype-array
only.Source§impl ChunkedArray<FixedSizeListType>
impl ChunkedArray<FixedSizeListType>
Sourcepub fn inner_dtype(&self) -> &DataType
Available on crate feature dtype-array
only.
pub fn inner_dtype(&self) -> &DataType
dtype-array
only.Get the inner data type of the fixed size list.
pub fn width(&self) -> usize
dtype-array
only.Sourcepub unsafe fn to_logical(&mut self, inner_dtype: DataType)
Available on crate feature dtype-array
only.
pub unsafe fn to_logical(&mut self, inner_dtype: DataType)
dtype-array
only.§Safety
The caller must ensure that the logical type given fits the physical type of the array.
Sourcepub fn get_inner(&self) -> Series
Available on crate feature dtype-array
only.
pub fn get_inner(&self) -> Series
dtype-array
only.Get the inner values as Series
Sourcepub fn apply_to_inner(
&self,
func: &dyn Fn(Series) -> PolarsResult<Series>,
) -> PolarsResult<ArrayChunked>
Available on crate feature dtype-array
only.
pub fn apply_to_inner( &self, func: &dyn Fn(Series) -> PolarsResult<Series>, ) -> PolarsResult<ArrayChunked>
dtype-array
only.Ignore the list indices and apply func
to the inner type as Series
.
Sourcepub fn get_leaf_array(&self) -> Series
Available on crate feature dtype-array
only.
pub fn get_leaf_array(&self) -> Series
dtype-array
only.Recurse nested types until we are at the leaf array.
Source§impl<T> ChunkedArray<T>
impl<T> ChunkedArray<T>
pub fn to_bytes_hashes<'a>( &'a self, multithreaded: bool, hb: PlRandomState, ) -> Vec<Vec<BytesHash<'a>>>
Source§impl<T> ChunkedArray<T>where
T: PolarsDataType,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
pub fn with_chunk<A>(name: PlSmallStr, arr: A) -> Selfwhere
A: Array,
T: PolarsDataType<Array = A>,
pub fn with_chunk_like<A>(ca: &Self, arr: A) -> Selfwhere
A: Array,
T: PolarsDataType<Array = A>,
pub fn from_chunk_iter<I>(name: PlSmallStr, iter: I) -> Selfwhere
I: IntoIterator,
T: PolarsDataType<Array = <I as IntoIterator>::Item>,
<I as IntoIterator>::Item: Array,
pub fn from_chunk_iter_like<I>(ca: &Self, iter: I) -> Selfwhere
I: IntoIterator,
T: PolarsDataType<Array = <I as IntoIterator>::Item>,
<I as IntoIterator>::Item: Array,
pub fn try_from_chunk_iter<I, A, E>( name: PlSmallStr, iter: I, ) -> Result<Self, E>
Sourcepub unsafe fn from_chunks(name: PlSmallStr, chunks: Vec<ArrayRef>) -> Self
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
.
Sourcepub unsafe fn with_chunks(&self, chunks: Vec<ArrayRef>) -> Self
pub unsafe fn with_chunks(&self, chunks: Vec<ArrayRef>) -> Self
§Safety
The Arrow datatype of all chunks must match the PolarsDataType
T
.
Sourcepub unsafe fn from_chunks_and_dtype(
name: PlSmallStr,
chunks: Vec<ArrayRef>,
dtype: DataType,
) -> Self
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
.
pub fn full_null_like(ca: &Self, length: usize) -> Self
Source§impl<T> ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
Sourcepub fn from_vec(name: PlSmallStr, v: Vec<T::Native>) -> Self
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.
Sourcepub fn from_vec_validity(
name: PlSmallStr,
values: Vec<T::Native>,
buffer: Option<Bitmap>,
) -> Self
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.
Sourcepub unsafe fn mmap_slice(name: PlSmallStr, values: &[T::Native]) -> Self
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>
impl ChunkedArray<BooleanType>
Sourcepub unsafe fn mmap_slice(
name: PlSmallStr,
values: &[u8],
offset: usize,
len: usize,
) -> Self
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>
impl ChunkedArray<ListType>
Sourcepub fn amortized_iter(
&self,
) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>
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
- Arc<..>
- Vec<…>
If the returned AmortSeries
is cloned, the local copy will be replaced and a new container
will be set.
Sourcepub fn amortized_iter_with_name(
&self,
name: PlSmallStr,
) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>
pub fn amortized_iter_with_name( &self, name: PlSmallStr, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<ArrayBox>> + '_>
See amortized_iter
.
Sourcepub fn apply_amortized_generic<F, K, V>(&self, f: F) -> ChunkedArray<V>where
V: PolarsDataType,
F: FnMut(Option<AmortSeries>) -> Option<K> + Copy,
V::Array: ArrayFromIter<Option<K>>,
pub fn apply_amortized_generic<F, K, V>(&self, f: F) -> ChunkedArray<V>where
V: PolarsDataType,
F: FnMut(Option<AmortSeries>) -> Option<K> + Copy,
V::Array: ArrayFromIter<Option<K>>,
Apply a closure F
elementwise.
pub fn try_apply_amortized_generic<F, K, V>(
&self,
f: F,
) -> PolarsResult<ChunkedArray<V>>where
V: PolarsDataType,
F: FnMut(Option<AmortSeries>) -> PolarsResult<Option<K>> + Copy,
V::Array: ArrayFromIter<Option<K>>,
pub fn for_each_amortized<F>(&self, f: F)
Sourcepub fn zip_and_apply_amortized<'a, T, I, F>(
&'a self,
ca: &'a ChunkedArray<T>,
f: F,
) -> Selfwhere
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>,
pub fn zip_and_apply_amortized<'a, T, I, F>(
&'a self,
ca: &'a ChunkedArray<T>,
f: F,
) -> Selfwhere
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.
pub fn binary_zip_and_apply_amortized<'a, T, U, F>(
&'a self,
ca1: &'a ChunkedArray<T>,
ca2: &'a ChunkedArray<U>,
f: F,
) -> Selfwhere
T: PolarsDataType,
U: PolarsDataType,
F: FnMut(Option<AmortSeries>, Option<T::Physical<'a>>, Option<U::Physical<'a>>) -> Option<Series>,
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>>,
Sourcepub fn apply_amortized<F>(&self, f: F) -> Self
pub fn apply_amortized<F>(&self, f: F) -> Self
Apply a closure F
elementwise.
pub fn try_apply_amortized<F>(&self, f: F) -> PolarsResult<Self>
Source§impl ChunkedArray<ListType>
impl ChunkedArray<ListType>
Sourcepub fn inner_dtype(&self) -> &DataType
pub fn inner_dtype(&self) -> &DataType
Get the inner data type of the list.
pub fn set_inner_dtype(&mut self, dtype: DataType)
pub fn set_fast_explode(&mut self)
pub fn _can_fast_explode(&self) -> bool
Sourcepub unsafe fn to_logical(&mut self, inner_dtype: DataType)
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.
Sourcepub fn apply_to_inner(
&self,
func: &dyn Fn(Series) -> PolarsResult<Series>,
) -> PolarsResult<ListChunked>
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
.
pub fn rechunk_and_trim_to_normalized_offsets(&self) -> Self
Source§impl ChunkedArray<Int128Type>
impl ChunkedArray<Int128Type>
pub fn into_decimal_unchecked( self, precision: Option<usize>, scale: usize, ) -> DecimalChunked
dtype-decimal
only.pub fn into_decimal( self, precision: Option<usize>, scale: usize, ) -> PolarsResult<DecimalChunked>
dtype-decimal
only.Source§impl<T> ChunkedArray<ObjectType<T>>where
T: PolarsObject,
impl<T> ChunkedArray<ObjectType<T>>where
T: PolarsObject,
pub fn new_from_vec(name: PlSmallStr, v: Vec<T>) -> Self
object
only.pub fn new_from_vec_and_validity( name: PlSmallStr, v: Vec<T>, validity: Bitmap, ) -> Self
object
only.pub fn new_empty(name: PlSmallStr) -> Self
object
only.Source§impl<T> ChunkedArray<ObjectType<T>>where
T: PolarsObject,
impl<T> ChunkedArray<ObjectType<T>>where
T: PolarsObject,
Sourcepub unsafe fn get_object_unchecked(
&self,
index: usize,
) -> Option<&dyn PolarsObjectSafe>
Available on crate feature object
only.
pub unsafe fn get_object_unchecked( &self, index: usize, ) -> Option<&dyn PolarsObjectSafe>
object
only.Get a hold to an object that can be formatted or downcasted via the Any trait.
§Safety
No bounds checks
Sourcepub fn get_object(&self, index: usize) -> Option<&dyn PolarsObjectSafe>
Available on crate feature object
only.
pub fn get_object(&self, index: usize) -> Option<&dyn PolarsObjectSafe>
object
only.Get a hold to an object that can be formatted or downcasted via the Any trait.
Source§impl<T> ChunkedArray<T>
impl<T> ChunkedArray<T>
Source§impl<T> ChunkedArray<T>
impl<T> ChunkedArray<T>
Sourcepub fn sample_n(
&self,
n: usize,
with_replacement: bool,
shuffle: bool,
seed: Option<u64>,
) -> PolarsResult<Self>
Available on crate feature random
only.
pub fn sample_n( &self, n: usize, with_replacement: bool, shuffle: bool, seed: Option<u64>, ) -> PolarsResult<Self>
random
only.Sample n datapoints from this ChunkedArray
.
Sourcepub fn sample_frac(
&self,
frac: f64,
with_replacement: bool,
shuffle: bool,
seed: Option<u64>,
) -> PolarsResult<Self>
Available on crate feature random
only.
pub fn sample_frac( &self, frac: f64, with_replacement: bool, shuffle: bool, seed: Option<u64>, ) -> PolarsResult<Self>
random
only.Sample a fraction between 0.0-1.0 of this ChunkedArray
.
Source§impl<T> ChunkedArray<T>
impl<T> ChunkedArray<T>
Sourcepub fn rand_normal(
name: PlSmallStr,
length: usize,
mean: f64,
std_dev: f64,
) -> PolarsResult<Self>
Available on crate feature random
only.
pub fn rand_normal( name: PlSmallStr, length: usize, mean: f64, std_dev: f64, ) -> PolarsResult<Self>
random
only.Create ChunkedArray
with samples from a Normal distribution.
Sourcepub fn rand_standard_normal(name: PlSmallStr, length: usize) -> Self
Available on crate feature random
only.
pub fn rand_standard_normal(name: PlSmallStr, length: usize) -> Self
random
only.Create ChunkedArray
with samples from a Standard Normal distribution.
Sourcepub fn rand_uniform(
name: PlSmallStr,
length: usize,
low: f64,
high: f64,
) -> Self
Available on crate feature random
only.
pub fn rand_uniform( name: PlSmallStr, length: usize, low: f64, high: f64, ) -> Self
random
only.Create ChunkedArray
with samples from a Uniform distribution.
Source§impl ChunkedArray<BooleanType>
impl ChunkedArray<BooleanType>
Sourcepub fn rand_bernoulli(
name: PlSmallStr,
length: usize,
p: f64,
) -> PolarsResult<Self>
Available on crate feature random
only.
pub fn rand_bernoulli( name: PlSmallStr, length: usize, p: f64, ) -> PolarsResult<Self>
random
only.Create ChunkedArray
with samples from a Bernoulli distribution.
Source§impl<T: PolarsNumericType> ChunkedArray<T>
impl<T: PolarsNumericType> ChunkedArray<T>
Source§impl<T: PolarsDataType> ChunkedArray<T>where
Metadata<T>: MetadataTrait,
impl<T: PolarsDataType> ChunkedArray<T>where
Metadata<T>: MetadataTrait,
Sourcepub fn metadata_dyn(&self) -> Option<RwLockReadGuard<'_, dyn MetadataTrait>>
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.
Sourcepub fn boxed_metadata_dyn<'a>(&'a self) -> Box<dyn MetadataTrait + 'a>
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>
impl<T: PolarsDataType> ChunkedArray<T>
Sourcepub fn unpack_series_matching_type<'a>(
&self,
series: &'a Series,
) -> PolarsResult<&'a ChunkedArray<T>>
pub fn unpack_series_matching_type<'a>( &self, series: &'a Series, ) -> PolarsResult<&'a ChunkedArray<T>>
Series to ChunkedArray<T>
Sourcepub unsafe fn new_with_dims(
field: Arc<Field>,
chunks: Vec<ArrayRef>,
length: usize,
null_count: usize,
) -> Self
pub unsafe fn new_with_dims( field: Arc<Field>, chunks: Vec<ArrayRef>, length: usize, null_count: usize, ) -> Self
Create a new ChunkedArray
and explicitly set its length
and null_count
.
§Safety
The length and null_count must be correct.
Sourcepub fn metadata(&self) -> MetadataReadGuard<'_, T>
pub fn metadata(&self) -> MetadataReadGuard<'_, T>
Get a guard to read the ChunkedArray
’s Metadata
Sourcepub fn interior_mut_metadata(&self) -> RwLockWriteGuard<'_, Metadata<T>>
pub fn interior_mut_metadata(&self) -> RwLockWriteGuard<'_, Metadata<T>>
Get a guard to read/write the ChunkedArray
’s Metadata
Sourcepub fn metadata_arc(&self) -> &Arc<IMMetadata<T>>
pub fn metadata_arc(&self) -> &Arc<IMMetadata<T>>
Get a reference to Arc
that contains the ChunkedArray
’s Metadata
Sourcepub fn metadata_owned_arc(&self) -> Arc<IMMetadata<T>>
pub fn metadata_owned_arc(&self) -> Arc<IMMetadata<T>>
Get a Arc
that contains the ChunkedArray
’s Metadata
Sourcepub fn metadata_mut(&mut self) -> &mut Arc<IMMetadata<T>>
pub fn metadata_mut(&mut self) -> &mut Arc<IMMetadata<T>>
Get a mutable reference to the Arc
that contains the ChunkedArray
’s Metadata
pub fn unset_fast_explode_list(&mut self)
pub fn set_fast_explode_list(&mut self, value: bool)
pub fn get_fast_explode_list(&self) -> bool
pub fn get_flags(&self) -> MetadataFlags
pub fn is_sorted_flag(&self) -> IsSorted
Sourcepub fn set_sorted_flag(&mut self, sorted: IsSorted)
pub fn set_sorted_flag(&mut self, sorted: IsSorted)
Set the ‘sorted’ bit meta info.
Sourcepub fn with_sorted_flag(&self, sorted: IsSorted) -> Self
pub fn with_sorted_flag(&self, sorted: IsSorted) -> Self
Set the ‘sorted’ bit meta info.
pub fn get_min_value(&self) -> Option<T::OwnedPhysical>
pub fn get_max_value(&self) -> Option<T::OwnedPhysical>
pub fn get_distinct_count(&self) -> Option<IdxSize>
pub fn merge_metadata(&mut self, md: Metadata<T>)
Sourcepub fn copy_metadata_cast<O: PolarsDataType>(
&mut self,
other: &ChunkedArray<O>,
props: MetadataProperties,
)
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 Metadata
s (e.g.
min_value
and max_value
) and will panic on debug builds if that is attempted.
Sourcepub fn copy_metadata(&mut self, other: &Self, props: MetadataProperties)
pub fn copy_metadata(&mut self, other: &Self, props: MetadataProperties)
Copies Metadata
properties specified by props
from other
into self
.
Sourcepub fn first_non_null(&self) -> Option<usize>
pub fn first_non_null(&self) -> Option<usize>
Get the index of the first non null value in this ChunkedArray
.
Sourcepub fn last_non_null(&self) -> Option<usize>
pub fn last_non_null(&self) -> Option<usize>
Get the index of the last non null value in this ChunkedArray
.
pub fn drop_nulls(&self) -> Self
Sourcepub fn iter_validities(
&self,
) -> Map<Iter<'_, ArrayRef>, fn(_: &ArrayRef) -> Option<&Bitmap>> ⓘ
pub fn iter_validities( &self, ) -> Map<Iter<'_, ArrayRef>, fn(_: &ArrayRef) -> Option<&Bitmap>> ⓘ
Get the buffer of bits representing null values
Sourcepub fn has_nulls(&self) -> bool
pub fn has_nulls(&self) -> bool
Return if any the chunks in this ChunkedArray
have nulls.
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrink the capacity of this array to fit its length.
pub fn clear(&self) -> Self
Sourcepub fn chunk_lengths(&self) -> ChunkLenIter<'_>
pub fn chunk_lengths(&self) -> ChunkLenIter<'_>
Returns an iterator over the lengths of the chunks of the array.
Sourcepub unsafe fn chunks_mut(&mut self) -> &mut Vec<ArrayRef>
pub unsafe fn chunks_mut(&mut self) -> &mut Vec<ArrayRef>
Sourcepub fn is_optimal_aligned(&self) -> bool
pub fn is_optimal_aligned(&self) -> bool
Returns true if contains a single chunk and has no null values
Sourcepub fn dtype(&self) -> &DataType
pub fn dtype(&self) -> &DataType
Get data type of ChunkedArray
.
Sourcepub fn name(&self) -> &PlSmallStr
pub fn name(&self) -> &PlSmallStr
Name of the ChunkedArray
.
Sourcepub fn rename(&mut self, name: PlSmallStr)
pub fn rename(&mut self, name: PlSmallStr)
Rename this ChunkedArray
.
Sourcepub fn with_name(self, name: PlSmallStr) -> Self
pub fn with_name(self, name: PlSmallStr) -> Self
Return this ChunkedArray
with a new name.
Source§impl<T> ChunkedArray<T>where
T: PolarsDataType,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
Sourcepub fn get(&self, idx: usize) -> Option<T::Physical<'_>>
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.
Sourcepub unsafe fn get_unchecked(&self, idx: usize) -> Option<T::Physical<'_>>
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()
.
Sourcepub unsafe fn value_unchecked(&self, idx: usize) -> T::Physical<'_>
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()
.
pub fn first(&self) -> Option<T::Physical<'_>>
pub fn last(&self) -> Option<T::Physical<'_>>
Source§impl ChunkedArray<ListType>
impl ChunkedArray<ListType>
pub fn get_as_series(&self, idx: usize) -> Option<Series>
Source§impl ChunkedArray<FixedSizeListType>
impl ChunkedArray<FixedSizeListType>
pub fn get_as_series(&self, idx: usize) -> Option<Series>
dtype-array
only.Source§impl<T> ChunkedArray<T>where
T: PolarsDataType,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
pub fn layout(&self) -> ChunkedArrayLayout<'_, T>
Source§impl<T> ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
Sourcepub fn cont_slice(&self) -> PolarsResult<&[T::Native]>
pub fn cont_slice(&self) -> PolarsResult<&[T::Native]>
Returns the values of the array as a contiguous slice.
Sourcepub fn data_views(&self) -> impl DoubleEndedIterator<Item = &[T::Native]>
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
pub fn into_no_null_iter( &self, ) -> impl '_ + Send + Sync + ExactSizeIterator<Item = T::Native> + DoubleEndedIterator + TrustedLen
Source§impl<T> ChunkedArray<T>
impl<T> ChunkedArray<T>
Sourcepub unsafe fn group_tuples_perfect(
&self,
num_groups: usize,
multithreaded: bool,
group_capacity: usize,
) -> GroupsProxy
Available on crate feature algorithm_group_by
only.
pub unsafe fn group_tuples_perfect( &self, num_groups: usize, multithreaded: bool, group_capacity: usize, ) -> GroupsProxy
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>
impl<T: PolarsNumericType> ChunkedArray<T>
Sourcepub fn new_vec(name: PlSmallStr, v: Vec<T::Native>) -> Self
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>
impl<T> ChunkedArray<T>
We cannot override the left hand side behaviour. So we create a trait LhsNumOps. This allows for 1.add(&Series)
Trait Implementations§
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Add<N> for &ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Add<N> for &ChunkedArray<T>
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Add<N> for ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Add<N> for ChunkedArray<T>
Source§impl<T: PolarsNumericType> Add for &ChunkedArray<T>
impl<T: PolarsNumericType> Add for &ChunkedArray<T>
Source§impl<T: PolarsNumericType> Add for ChunkedArray<T>
impl<T: PolarsNumericType> Add for ChunkedArray<T>
Source§impl<T> AggList for ChunkedArray<T>
Available on crate feature algorithm_group_by
only.
impl<T> AggList for ChunkedArray<T>
algorithm_group_by
only.Source§impl<T: PolarsNumericType> ArithmeticChunked for &ChunkedArray<T>
impl<T: PolarsNumericType> ArithmeticChunked for &ChunkedArray<T>
type Scalar = <T as PolarsNumericType>::Native
type Out = ChunkedArray<T>
type TrueDivOut = ChunkedArray<<<T as PolarsNumericType>::Native as NumericNative>::TrueDivPolarsType>
fn wrapping_abs(self) -> Self::Out
fn wrapping_neg(self) -> Self::Out
fn wrapping_add(self, rhs: Self) -> Self::Out
fn wrapping_sub(self, rhs: Self) -> Self::Out
fn wrapping_mul(self, rhs: Self) -> Self::Out
fn wrapping_floor_div(self, rhs: Self) -> Self::Out
fn wrapping_trunc_div(self, rhs: Self) -> Self::Out
fn wrapping_mod(self, rhs: Self) -> Self::Out
fn wrapping_add_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_sub_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_sub_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn wrapping_mul_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_floor_div_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_floor_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn wrapping_trunc_div_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_trunc_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn wrapping_mod_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_mod_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn true_div(self, rhs: Self) -> Self::TrueDivOut
fn true_div_scalar(self, rhs: Self::Scalar) -> Self::TrueDivOut
fn true_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::TrueDivOut
fn legacy_div(self, rhs: Self) -> Self::Out
fn legacy_div_scalar(self, rhs: Self::Scalar) -> Self::Out
fn legacy_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
Source§impl<T: PolarsNumericType> ArithmeticChunked for ChunkedArray<T>
impl<T: PolarsNumericType> ArithmeticChunked for ChunkedArray<T>
type Scalar = <T as PolarsNumericType>::Native
type Out = ChunkedArray<T>
type TrueDivOut = ChunkedArray<<<T as PolarsNumericType>::Native as NumericNative>::TrueDivPolarsType>
fn wrapping_abs(self) -> Self::Out
fn wrapping_neg(self) -> Self::Out
fn wrapping_add(self, rhs: Self) -> Self::Out
fn wrapping_sub(self, rhs: Self) -> Self::Out
fn wrapping_mul(self, rhs: Self) -> Self::Out
fn wrapping_floor_div(self, rhs: Self) -> Self::Out
fn wrapping_trunc_div(self, rhs: Self) -> Self::Out
fn wrapping_mod(self, rhs: Self) -> Self::Out
fn wrapping_add_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_sub_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_sub_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn wrapping_mul_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_floor_div_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_floor_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn wrapping_trunc_div_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_trunc_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn wrapping_mod_scalar(self, rhs: Self::Scalar) -> Self::Out
fn wrapping_mod_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::Out
fn true_div(self, rhs: Self) -> Self::TrueDivOut
fn true_div_scalar(self, rhs: Self::Scalar) -> Self::TrueDivOut
fn true_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self::TrueDivOut
fn legacy_div(self, rhs: Self) -> Self::Out
fn legacy_div_scalar(self, rhs: Self::Scalar) -> Self::Out
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,
impl<T> AsMut<ChunkedArray<T>> for dyn SeriesTrait + '_where
T: 'static + PolarsDataType,
Source§fn as_mut(&mut self) -> &mut ChunkedArray<T>
fn as_mut(&mut self) -> &mut ChunkedArray<T>
Source§impl<T: PolarsDataType> AsRef<ChunkedArray<T>> for ChunkedArray<T>
impl<T: PolarsDataType> AsRef<ChunkedArray<T>> for ChunkedArray<T>
Source§fn as_ref(&self) -> &ChunkedArray<T>
fn as_ref(&self) -> &ChunkedArray<T>
Source§impl<T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + '_where
T: 'static + PolarsDataType,
impl<T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + '_where
T: 'static + PolarsDataType,
Source§fn as_ref(&self) -> &ChunkedArray<T>
fn as_ref(&self) -> &ChunkedArray<T>
Source§impl<T: PolarsDataType> AsRefDataType for ChunkedArray<T>
impl<T: PolarsDataType> AsRefDataType for ChunkedArray<T>
fn as_ref_dtype(&self) -> &DataType
Source§impl<T> BitAnd for &ChunkedArray<T>
impl<T> BitAnd for &ChunkedArray<T>
Source§impl<T> BitOr for &ChunkedArray<T>
impl<T> BitOr for &ChunkedArray<T>
Source§impl<T> BitXor for &ChunkedArray<T>
impl<T> BitXor for &ChunkedArray<T>
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>,
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>
fn sum(&self) -> Option<T::Native>
None
if not implemented for T
.
If the array is empty, 0
is returnedfn _sum_as_f64(&self) -> f64
fn min(&self) -> Option<T::Native>
Source§fn max(&self) -> Option<T::Native>
fn max(&self) -> Option<T::Native>
None
if the array is empty or only contains null values.fn min_max(&self) -> Option<(T::Native, T::Native)>
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,
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
fn sum_reduce(&self) -> Scalar
ChunkedArray
as a new Series
of length 1.Source§fn max_reduce(&self) -> Scalar
fn max_reduce(&self) -> Scalar
ChunkedArray
as a new Series
of length 1.Source§fn min_reduce(&self) -> Scalar
fn min_reduce(&self) -> Scalar
ChunkedArray
as a new Series
of length 1.Source§fn prod_reduce(&self) -> Scalar
fn prod_reduce(&self) -> Scalar
ChunkedArray
as a new Series
of length 1.Source§impl<T> ChunkAnyValue for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkAnyValue for ChunkedArray<T>where
T: PolarsNumericType,
Source§unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
Source§fn get_any_value(&self, index: usize) -> PolarsResult<AnyValue<'_>>
fn get_any_value(&self, index: usize) -> PolarsResult<AnyValue<'_>>
Source§impl<'a, T> ChunkApply<'a, <T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
impl<'a, T> ChunkApply<'a, <T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
type FuncRet = <T as PolarsNumericType>::Native
Source§fn apply_values<F>(&'a self, f: F) -> Self
fn apply_values<F>(&'a self, f: F) -> Self
Source§impl<T> ChunkApplyKernel<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkApplyKernel<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn apply_kernel(
&self,
f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef,
) -> Self
fn apply_kernel( &self, f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef, ) -> Self
Source§fn apply_kernel_cast<S>(
&self,
f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef,
) -> ChunkedArray<S>where
S: PolarsDataType,
fn apply_kernel_cast<S>(
&self,
f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef,
) -> ChunkedArray<S>where
S: PolarsDataType,
Source§impl<T> ChunkCast for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkCast for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn cast_with_options(
&self,
dtype: &DataType,
options: CastOptions,
) -> PolarsResult<Series>
fn cast_with_options( &self, dtype: &DataType, options: CastOptions, ) -> PolarsResult<Series>
ChunkedArray
to DataType
Source§unsafe fn cast_unchecked(&self, dtype: &DataType) -> PolarsResult<Series>
unsafe fn cast_unchecked(&self, dtype: &DataType) -> PolarsResult<Series>
Source§fn cast(&self, dtype: &DataType) -> PolarsResult<Series>
fn cast(&self, dtype: &DataType) -> PolarsResult<Series>
ChunkedArray
to DataType
Source§impl ChunkCompareEq<&ChunkedArray<BinaryType>> for BinaryChunked
impl ChunkCompareEq<&ChunkedArray<BinaryType>> for BinaryChunked
type Item = ChunkedArray<BooleanType>
Source§fn equal(&self, rhs: &BinaryChunked) -> BooleanChunked
fn equal(&self, rhs: &BinaryChunked) -> BooleanChunked
Source§fn equal_missing(&self, rhs: &BinaryChunked) -> BooleanChunked
fn equal_missing(&self, rhs: &BinaryChunked) -> BooleanChunked
None == None
.Source§fn not_equal(&self, rhs: &BinaryChunked) -> BooleanChunked
fn not_equal(&self, rhs: &BinaryChunked) -> BooleanChunked
Source§fn not_equal_missing(&self, rhs: &BinaryChunked) -> BooleanChunked
fn not_equal_missing(&self, rhs: &BinaryChunked) -> BooleanChunked
None == None
.Source§impl ChunkCompareEq<&ChunkedArray<BooleanType>> for BooleanChunked
impl ChunkCompareEq<&ChunkedArray<BooleanType>> for BooleanChunked
type Item = ChunkedArray<BooleanType>
Source§fn equal(&self, rhs: &BooleanChunked) -> BooleanChunked
fn equal(&self, rhs: &BooleanChunked) -> BooleanChunked
Source§fn equal_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
fn equal_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
None == None
.Source§fn not_equal(&self, rhs: &BooleanChunked) -> BooleanChunked
fn not_equal(&self, rhs: &BooleanChunked) -> BooleanChunked
Source§fn not_equal_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
fn not_equal_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
None == None
.Source§impl ChunkCompareEq<&ChunkedArray<FixedSizeListType>> for ArrayChunked
Available on crate feature dtype-array
only.
impl ChunkCompareEq<&ChunkedArray<FixedSizeListType>> for ArrayChunked
dtype-array
only.type Item = ChunkedArray<BooleanType>
Source§fn equal(&self, rhs: &ArrayChunked) -> BooleanChunked
fn equal(&self, rhs: &ArrayChunked) -> BooleanChunked
Source§fn equal_missing(&self, rhs: &ArrayChunked) -> BooleanChunked
fn equal_missing(&self, rhs: &ArrayChunked) -> BooleanChunked
None == None
.Source§fn not_equal(&self, rhs: &ArrayChunked) -> BooleanChunked
fn not_equal(&self, rhs: &ArrayChunked) -> BooleanChunked
Source§fn not_equal_missing(&self, rhs: &ArrayChunked) -> Self::Item
fn not_equal_missing(&self, rhs: &ArrayChunked) -> Self::Item
None == None
.Source§impl ChunkCompareEq<&ChunkedArray<ListType>> for ListChunked
impl ChunkCompareEq<&ChunkedArray<ListType>> for ListChunked
type Item = ChunkedArray<BooleanType>
Source§fn equal(&self, rhs: &ListChunked) -> BooleanChunked
fn equal(&self, rhs: &ListChunked) -> BooleanChunked
Source§fn equal_missing(&self, rhs: &ListChunked) -> BooleanChunked
fn equal_missing(&self, rhs: &ListChunked) -> BooleanChunked
None == None
.Source§fn not_equal(&self, rhs: &ListChunked) -> BooleanChunked
fn not_equal(&self, rhs: &ListChunked) -> BooleanChunked
Source§fn not_equal_missing(&self, rhs: &ListChunked) -> BooleanChunked
fn not_equal_missing(&self, rhs: &ListChunked) -> BooleanChunked
None == None
.Source§impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked
Available on crate feature dtype-categorical
only.
impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked
dtype-categorical
only.type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§fn equal(&self, rhs: &StringChunked) -> Self::Item
fn equal(&self, rhs: &StringChunked) -> Self::Item
Source§fn equal_missing(&self, rhs: &StringChunked) -> Self::Item
fn equal_missing(&self, rhs: &StringChunked) -> Self::Item
None == None
.Source§fn not_equal(&self, rhs: &StringChunked) -> Self::Item
fn not_equal(&self, rhs: &StringChunked) -> Self::Item
Source§fn not_equal_missing(&self, rhs: &StringChunked) -> Self::Item
fn not_equal_missing(&self, rhs: &StringChunked) -> Self::Item
None == None
.Source§impl ChunkCompareEq<&ChunkedArray<StringType>> for StringChunked
impl ChunkCompareEq<&ChunkedArray<StringType>> for StringChunked
type Item = ChunkedArray<BooleanType>
Source§fn equal(&self, rhs: &StringChunked) -> BooleanChunked
fn equal(&self, rhs: &StringChunked) -> BooleanChunked
Source§fn equal_missing(&self, rhs: &StringChunked) -> BooleanChunked
fn equal_missing(&self, rhs: &StringChunked) -> BooleanChunked
None == None
.Source§fn not_equal(&self, rhs: &StringChunked) -> BooleanChunked
fn not_equal(&self, rhs: &StringChunked) -> BooleanChunked
Source§fn not_equal_missing(&self, rhs: &StringChunked) -> BooleanChunked
fn not_equal_missing(&self, rhs: &StringChunked) -> BooleanChunked
None == None
.Source§impl<T> ChunkCompareEq<&ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,
impl<T> ChunkCompareEq<&ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,
type Item = ChunkedArray<BooleanType>
Source§fn equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
Source§fn equal_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn equal_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
None == None
.Source§fn not_equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn not_equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
Source§fn not_equal_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn not_equal_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
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>,
impl<T, Rhs> ChunkCompareEq<Rhs> for ChunkedArray<T>where
T: PolarsNumericType,
Rhs: ToPrimitive,
T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,
type Item = ChunkedArray<BooleanType>
Source§fn equal(&self, rhs: Rhs) -> BooleanChunked
fn equal(&self, rhs: Rhs) -> BooleanChunked
Source§fn equal_missing(&self, rhs: Rhs) -> BooleanChunked
fn equal_missing(&self, rhs: Rhs) -> BooleanChunked
None == None
.Source§fn not_equal(&self, rhs: Rhs) -> BooleanChunked
fn not_equal(&self, rhs: Rhs) -> BooleanChunked
Source§fn not_equal_missing(&self, rhs: Rhs) -> BooleanChunked
fn not_equal_missing(&self, rhs: Rhs) -> BooleanChunked
None == None
.Source§impl ChunkCompareIneq<&ChunkedArray<BinaryType>> for BinaryChunked
impl ChunkCompareIneq<&ChunkedArray<BinaryType>> for BinaryChunked
type Item = ChunkedArray<BooleanType>
Source§fn lt(&self, rhs: &BinaryChunked) -> BooleanChunked
fn lt(&self, rhs: &BinaryChunked) -> BooleanChunked
Source§fn lt_eq(&self, rhs: &BinaryChunked) -> BooleanChunked
fn lt_eq(&self, rhs: &BinaryChunked) -> BooleanChunked
Source§fn gt(&self, rhs: &Self) -> BooleanChunked
fn gt(&self, rhs: &Self) -> BooleanChunked
Source§fn gt_eq(&self, rhs: &Self) -> BooleanChunked
fn gt_eq(&self, rhs: &Self) -> BooleanChunked
Source§impl ChunkCompareIneq<&ChunkedArray<BooleanType>> for BooleanChunked
impl ChunkCompareIneq<&ChunkedArray<BooleanType>> for BooleanChunked
type Item = ChunkedArray<BooleanType>
Source§fn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
fn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
Source§fn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
fn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
Source§fn gt(&self, rhs: &Self) -> BooleanChunked
fn gt(&self, rhs: &Self) -> BooleanChunked
Source§fn gt_eq(&self, rhs: &Self) -> BooleanChunked
fn gt_eq(&self, rhs: &Self) -> BooleanChunked
Source§impl ChunkCompareIneq<&ChunkedArray<StringType>> for CategoricalChunked
Available on crate feature dtype-categorical
only.
impl ChunkCompareIneq<&ChunkedArray<StringType>> for CategoricalChunked
dtype-categorical
only.type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§fn gt(&self, rhs: &StringChunked) -> Self::Item
fn gt(&self, rhs: &StringChunked) -> Self::Item
Source§fn gt_eq(&self, rhs: &StringChunked) -> Self::Item
fn gt_eq(&self, rhs: &StringChunked) -> Self::Item
Source§fn lt(&self, rhs: &StringChunked) -> Self::Item
fn lt(&self, rhs: &StringChunked) -> Self::Item
Source§fn lt_eq(&self, rhs: &StringChunked) -> Self::Item
fn lt_eq(&self, rhs: &StringChunked) -> Self::Item
Source§impl ChunkCompareIneq<&ChunkedArray<StringType>> for StringChunked
impl ChunkCompareIneq<&ChunkedArray<StringType>> for StringChunked
type Item = ChunkedArray<BooleanType>
Source§fn gt(&self, rhs: &StringChunked) -> BooleanChunked
fn gt(&self, rhs: &StringChunked) -> BooleanChunked
Source§fn gt_eq(&self, rhs: &StringChunked) -> BooleanChunked
fn gt_eq(&self, rhs: &StringChunked) -> BooleanChunked
Source§fn lt(&self, rhs: &StringChunked) -> BooleanChunked
fn lt(&self, rhs: &StringChunked) -> BooleanChunked
Source§fn lt_eq(&self, rhs: &StringChunked) -> BooleanChunked
fn lt_eq(&self, rhs: &StringChunked) -> BooleanChunked
Source§impl<T> ChunkCompareIneq<&ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,
impl<T> ChunkCompareIneq<&ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,
type Item = ChunkedArray<BooleanType>
Source§fn lt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn lt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
Source§fn lt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn lt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
Source§fn gt(&self, rhs: &Self) -> BooleanChunked
fn gt(&self, rhs: &Self) -> BooleanChunked
Source§fn gt_eq(&self, rhs: &Self) -> BooleanChunked
fn gt_eq(&self, rhs: &Self) -> BooleanChunked
Source§impl<T, Rhs> ChunkCompareIneq<Rhs> for ChunkedArray<T>where
T: PolarsNumericType,
Rhs: ToPrimitive,
T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,
impl<T, Rhs> ChunkCompareIneq<Rhs> for ChunkedArray<T>where
T: PolarsNumericType,
Rhs: ToPrimitive,
T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,
type Item = ChunkedArray<BooleanType>
Source§fn gt(&self, rhs: Rhs) -> BooleanChunked
fn gt(&self, rhs: Rhs) -> BooleanChunked
Source§fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
Source§fn lt(&self, rhs: Rhs) -> BooleanChunked
fn lt(&self, rhs: Rhs) -> BooleanChunked
Source§fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
Source§impl<T: PolarsNumericType> ChunkExpandAtIndex<T> for ChunkedArray<T>
impl<T: PolarsNumericType> ChunkExpandAtIndex<T> for ChunkedArray<T>
Source§fn new_from_index(&self, index: usize, length: usize) -> ChunkedArray<T>
fn new_from_index(&self, index: usize, length: usize) -> ChunkedArray<T>
Source§impl<T> ChunkFillNullValue<<T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkFillNullValue<<T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn fill_null_with_values(&self, value: T::Native) -> PolarsResult<Self>
fn fill_null_with_values(&self, value: T::Native) -> PolarsResult<Self>
T
.Source§impl<T> ChunkFilter<T> for ChunkedArray<T>
impl<T> ChunkFilter<T> for ChunkedArray<T>
Source§fn filter(&self, filter: &BooleanChunked) -> PolarsResult<ChunkedArray<T>>
fn filter(&self, filter: &BooleanChunked) -> PolarsResult<ChunkedArray<T>>
Source§impl<T> ChunkFull<<T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkFull<<T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
Source§impl<T> ChunkFullNull for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkFullNull for ChunkedArray<T>where
T: PolarsNumericType,
fn full_null(name: PlSmallStr, length: usize) -> Self
Source§impl<T> ChunkQuantile<f64> for ChunkedArray<T>
impl<T> ChunkQuantile<f64> for ChunkedArray<T>
Source§fn quantile(
&self,
quantile: f64,
method: QuantileMethod,
) -> PolarsResult<Option<f64>>
fn quantile( &self, quantile: f64, method: QuantileMethod, ) -> PolarsResult<Option<f64>>
None
if the array is empty or only contains null values.Source§impl<T> ChunkReverse for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkReverse for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn reverse(&self) -> ChunkedArray<T>
fn reverse(&self) -> ChunkedArray<T>
Source§impl<T> ChunkRollApply for ChunkedArray<T>where
T: PolarsNumericType,
Self: IntoSeries,
Available on crate feature rolling_window
only.
impl<T> ChunkRollApply for ChunkedArray<T>where
T: PolarsNumericType,
Self: IntoSeries,
rolling_window
only.Source§fn rolling_map(
&self,
f: &dyn Fn(&Series) -> Series,
options: RollingOptionsFixedWindow,
) -> PolarsResult<Series>
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>where
T: PolarsNumericType,
impl<'a, T> ChunkSet<'a, <T as PolarsNumericType>::Native, <T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn scatter_single<I: IntoIterator<Item = IdxSize>>(
&'a self,
idx: I,
value: Option<T::Native>,
) -> PolarsResult<Self>
fn scatter_single<I: IntoIterator<Item = IdxSize>>( &'a self, idx: I, value: Option<T::Native>, ) -> PolarsResult<Self>
Source§fn scatter_with<I: IntoIterator<Item = IdxSize>, F>(
&'a self,
idx: I,
f: F,
) -> PolarsResult<Self>
fn scatter_with<I: IntoIterator<Item = IdxSize>, F>( &'a self, idx: I, f: F, ) -> PolarsResult<Self>
idx
by applying a closure to these values. Read moreSource§fn set(
&'a self,
mask: &BooleanChunked,
value: Option<T::Native>,
) -> PolarsResult<Self>
fn set( &'a self, mask: &BooleanChunked, value: Option<T::Native>, ) -> PolarsResult<Self>
Source§impl<T> ChunkShift<T> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkShift<T> for ChunkedArray<T>where
T: PolarsNumericType,
fn shift(&self, periods: i64) -> ChunkedArray<T>
Source§impl<T> ChunkShiftFill<T, Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkShiftFill<T, Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<T::Native>,
) -> ChunkedArray<T>
fn shift_and_fill( &self, periods: i64, fill_value: Option<T::Native>, ) -> ChunkedArray<T>
fill_value
.Source§impl<T> ChunkSort<T> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkSort<T> for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn arg_sort_multiple(
&self,
by: &[Column],
options: &SortMultipleOptions,
) -> PolarsResult<IdxCa>
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
fn sort_with(&self, options: SortOptions) -> ChunkedArray<T>
Source§fn sort(&self, descending: bool) -> ChunkedArray<T>
fn sort(&self, descending: bool) -> ChunkedArray<T>
ChunkedArray
.Source§fn arg_sort(&self, options: SortOptions) -> IdxCa
fn arg_sort(&self, options: SortOptions) -> IdxCa
Source§impl<T: PolarsDataType> ChunkTake<ChunkedArray<UInt32Type>> for ChunkedArray<T>
impl<T: PolarsDataType> ChunkTake<ChunkedArray<UInt32Type>> for ChunkedArray<T>
Source§fn take(&self, indices: &IdxCa) -> PolarsResult<Self>
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>where
ChunkedArray<T>: ChunkTakeUnchecked<I>,
impl<T: PolarsDataType, I: AsRef<[IdxSize]> + ?Sized> ChunkTake<I> for ChunkedArray<T>where
ChunkedArray<T>: ChunkTakeUnchecked<I>,
Source§fn take(&self, indices: &I) -> PolarsResult<Self>
fn take(&self, indices: &I) -> PolarsResult<Self>
Gather values from ChunkedArray by index.
Source§impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for BinaryChunked
impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for BinaryChunked
Source§unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
Gather values from ChunkedArray by index.
Source§impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ArrayChunked
Available on crate feature dtype-array
only.
impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ArrayChunked
dtype-array
only.Source§unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
Source§impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ListChunked
impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ListChunked
Source§unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
Source§impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for StringChunked
impl ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for StringChunked
Source§unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
Source§impl<T> ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ChunkedArray<T>
impl<T> ChunkTakeUnchecked<ChunkedArray<UInt32Type>> for ChunkedArray<T>
Source§unsafe fn take_unchecked(&self, indices: &IdxCa) -> Self
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>
impl<T, I: AsRef<[IdxSize]> + ?Sized> ChunkTakeUnchecked<I> for ChunkedArray<T>
Source§unsafe fn take_unchecked(&self, indices: &I) -> Self
unsafe fn take_unchecked(&self, indices: &I) -> Self
Gather values from ChunkedArray by index.
Source§impl<T> ChunkUnique for ChunkedArray<T>where
T: PolarsNumericType,
T::Native: TotalHash + TotalEq + ToTotalOrd,
<T::Native as ToTotalOrd>::TotalOrdItem: Hash + Eq + Ord,
ChunkedArray<T>: IntoSeries + for<'a> ChunkCompareEq<&'a ChunkedArray<T>, Item = BooleanChunked>,
Available on crate feature algorithm_group_by
only.
impl<T> ChunkUnique for ChunkedArray<T>where
T: PolarsNumericType,
T::Native: TotalHash + TotalEq + ToTotalOrd,
<T::Native as ToTotalOrd>::TotalOrdItem: Hash + Eq + Ord,
ChunkedArray<T>: IntoSeries + for<'a> ChunkCompareEq<&'a ChunkedArray<T>, Item = BooleanChunked>,
algorithm_group_by
only.Source§fn unique(&self) -> PolarsResult<Self>
fn unique(&self) -> PolarsResult<Self>
Source§fn arg_unique(&self) -> PolarsResult<IdxCa>
fn arg_unique(&self) -> PolarsResult<IdxCa>
ChunkedArray
.
This Vec is sorted.Source§fn n_unique(&self) -> PolarsResult<usize>
fn n_unique(&self) -> PolarsResult<usize>
ChunkedArray
Source§impl<T> ChunkVar for ChunkedArray<T>
impl<T> ChunkVar for ChunkedArray<T>
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.
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>,
zip_with
only.Source§fn zip_with(
&self,
mask: &BooleanChunked,
other: &ChunkedArray<T>,
) -> PolarsResult<ChunkedArray<T>>
fn zip_with( &self, mask: &BooleanChunked, other: &ChunkedArray<T>, ) -> PolarsResult<ChunkedArray<T>>
true
and values
from other
where the mask evaluates false
Source§impl<T: PolarsDataType> Clone for ChunkedArray<T>
impl<T: PolarsDataType> Clone for ChunkedArray<T>
Source§impl<T: PolarsDataType> Container for ChunkedArray<T>
impl<T: PolarsDataType> Container for ChunkedArray<T>
Source§impl Debug for ChunkedArray<BooleanType>
impl Debug for ChunkedArray<BooleanType>
Source§impl<T> Debug for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Debug for ChunkedArray<T>where
T: PolarsNumericType,
Source§impl<T: PolarsDataType> Default for ChunkedArray<T>
impl<T: PolarsDataType> Default for ChunkedArray<T>
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Div<N> for &ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Div<N> for &ChunkedArray<T>
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Div<N> for ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Div<N> for ChunkedArray<T>
Source§impl<T: PolarsNumericType> Div for &ChunkedArray<T>
impl<T: PolarsNumericType> Div for &ChunkedArray<T>
Source§impl<T: PolarsNumericType> Div for ChunkedArray<T>
impl<T: PolarsNumericType> Div for ChunkedArray<T>
Source§impl<T: PolarsDataType> Drop for ChunkedArray<T>
Available on crate feature object
only.
impl<T: PolarsDataType> Drop for ChunkedArray<T>
object
only.Source§impl<'a, T> From<&'a ChunkedArray<T>> for Vec<Option<T::Physical<'a>>>where
T: PolarsDataType,
impl<'a, T> From<&'a ChunkedArray<T>> for Vec<Option<T::Physical<'a>>>where
T: PolarsDataType,
Source§fn from(ca: &'a ChunkedArray<T>) -> Self
fn from(ca: &'a ChunkedArray<T>) -> Self
Source§impl<T, A> From<A> for ChunkedArray<T>where
T: PolarsDataType<Array = A>,
A: Array,
impl<T, A> From<A> for ChunkedArray<T>where
T: PolarsDataType<Array = A>,
A: Array,
Source§impl From<ChunkedArray<BooleanType>> for Vec<Option<bool>>
impl From<ChunkedArray<BooleanType>> for Vec<Option<bool>>
Source§fn from(ca: BooleanChunked) -> Self
fn from(ca: BooleanChunked) -> Self
Source§impl From<ChunkedArray<StringType>> for Vec<Option<String>>
impl From<ChunkedArray<StringType>> for Vec<Option<String>>
Source§fn from(ca: StringChunked) -> Self
fn from(ca: StringChunked) -> Self
Source§impl<T> From<ChunkedArray<T>> for Series
impl<T> From<ChunkedArray<T>> for Series
Source§fn from(ca: ChunkedArray<T>) -> Self
fn from(ca: ChunkedArray<T>) -> Self
Source§impl<T> FromIterator<(Vec<<T as PolarsNumericType>::Native>, Option<Bitmap>)> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> FromIterator<(Vec<<T as PolarsNumericType>::Native>, Option<Bitmap>)> for ChunkedArray<T>where
T: PolarsNumericType,
Source§impl<T> FromIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> FromIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
FromIterator trait
Source§impl FromIterator<Option<bool>> for ChunkedArray<BooleanType>
impl FromIterator<Option<bool>> for ChunkedArray<BooleanType>
Source§impl<T> FromIteratorReversed<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> FromIteratorReversed<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
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>where
T: PolarsNumericType,
impl<T> FromParallelIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn from_par_iter<I: IntoParallelIterator<Item = Option<T::Native>>>(
iter: I,
) -> Self
fn from_par_iter<I: IntoParallelIterator<Item = Option<T::Native>>>( iter: I, ) -> Self
par_iter
. Read moreSource§impl<T> FromTrustedLenIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> FromTrustedLenIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T>where
T: PolarsNumericType,
fn from_iter_trusted_length<I: IntoIterator<Item = Option<T::Native>>>(
iter: I,
) -> Selfwhere
I::IntoIter: TrustedLen,
Source§impl FromTrustedLenIterator<Option<bool>> for ChunkedArray<BooleanType>
impl FromTrustedLenIterator<Option<bool>> for ChunkedArray<BooleanType>
fn from_iter_trusted_length<I: IntoIterator<Item = Option<bool>>>(
iter: I,
) -> Selfwhere
I::IntoIter: TrustedLen,
Source§impl<T> IntoGroupsProxy for ChunkedArray<T>
Available on crate feature algorithm_group_by
only.
impl<T> IntoGroupsProxy for ChunkedArray<T>
algorithm_group_by
only.Source§fn group_tuples(
&self,
multithreaded: bool,
sorted: bool,
) -> PolarsResult<GroupsProxy>
fn group_tuples( &self, multithreaded: bool, sorted: bool, ) -> PolarsResult<GroupsProxy>
Source§impl<'a, T> IntoIterator for &'a ChunkedArray<T>where
T: PolarsNumericType,
impl<'a, T> IntoIterator for &'a ChunkedArray<T>where
T: PolarsNumericType,
Source§type Item = Option<<T as PolarsNumericType>::Native>
type Item = Option<<T as PolarsNumericType>::Native>
Source§type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<T> as IntoIterator>::Item> + 'a>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<T> as IntoIterator>::Item> + 'a>
Source§impl<T: PolarsDataType + 'static> IntoSeries for ChunkedArray<T>where
SeriesWrap<ChunkedArray<T>>: SeriesTrait,
impl<T: PolarsDataType + 'static> IntoSeries for ChunkedArray<T>where
SeriesWrap<ChunkedArray<T>>: SeriesTrait,
Source§impl<T> MetadataCollectable<T> for ChunkedArray<T>
impl<T> MetadataCollectable<T> for ChunkedArray<T>
fn collect_cheap_metadata(&mut self)
fn with_cheap_metadata(self) -> Self
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Mul<N> for &ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Mul<N> for &ChunkedArray<T>
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Mul<N> for ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Mul<N> for ChunkedArray<T>
Source§impl<T: PolarsNumericType> Mul for &ChunkedArray<T>
impl<T: PolarsNumericType> Mul for &ChunkedArray<T>
Source§impl<T: PolarsNumericType> Mul for ChunkedArray<T>
impl<T: PolarsNumericType> Mul for ChunkedArray<T>
Source§impl NamedFrom<Range<u32>, UInt32Type> for ChunkedArray<UInt32Type>
impl NamedFrom<Range<u32>, UInt32Type> for ChunkedArray<UInt32Type>
Source§impl NamedFrom<Range<u64>, UInt64Type> for ChunkedArray<UInt64Type>
impl NamedFrom<Range<u64>, UInt64Type> for ChunkedArray<UInt64Type>
Source§impl<T: AsRef<[Option<String>]>> NamedFrom<T, [Option<String>]> for ChunkedArray<StringType>
impl<T: AsRef<[Option<String>]>> NamedFrom<T, [Option<String>]> for ChunkedArray<StringType>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<Vec<u8>>]>> NamedFrom<T, [Option<Vec<u8>>]> for ChunkedArray<BinaryType>
impl<T: AsRef<[Option<Vec<u8>>]>> NamedFrom<T, [Option<Vec<u8>>]> for ChunkedArray<BinaryType>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<bool>]>> NamedFrom<T, [Option<bool>]> for ChunkedArray<BooleanType>
impl<T: AsRef<[Option<bool>]>> NamedFrom<T, [Option<bool>]> for ChunkedArray<BooleanType>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<f32>]>> NamedFrom<T, [Option<f32>]> for ChunkedArray<Float32Type>
impl<T: AsRef<[Option<f32>]>> NamedFrom<T, [Option<f32>]> for ChunkedArray<Float32Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<f64>]>> NamedFrom<T, [Option<f64>]> for ChunkedArray<Float64Type>
impl<T: AsRef<[Option<f64>]>> NamedFrom<T, [Option<f64>]> for ChunkedArray<Float64Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<i128>]>> NamedFrom<T, [Option<i128>]> for ChunkedArray<Int128Type>
impl<T: AsRef<[Option<i128>]>> NamedFrom<T, [Option<i128>]> for ChunkedArray<Int128Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<i32>]>> NamedFrom<T, [Option<i32>]> for ChunkedArray<Int32Type>
impl<T: AsRef<[Option<i32>]>> NamedFrom<T, [Option<i32>]> for ChunkedArray<Int32Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<i64>]>> NamedFrom<T, [Option<i64>]> for ChunkedArray<Int64Type>
impl<T: AsRef<[Option<i64>]>> NamedFrom<T, [Option<i64>]> for ChunkedArray<Int64Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<u32>]>> NamedFrom<T, [Option<u32>]> for ChunkedArray<UInt32Type>
impl<T: AsRef<[Option<u32>]>> NamedFrom<T, [Option<u32>]> for ChunkedArray<UInt32Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Option<u64>]>> NamedFrom<T, [Option<u64>]> for ChunkedArray<UInt64Type>
impl<T: AsRef<[Option<u64>]>> NamedFrom<T, [Option<u64>]> for ChunkedArray<UInt64Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[String]>> NamedFrom<T, [String]> for ChunkedArray<StringType>
impl<T: AsRef<[String]>> NamedFrom<T, [String]> for ChunkedArray<StringType>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[Vec<u8>]>> NamedFrom<T, [Vec<u8>]> for ChunkedArray<BinaryType>
impl<T: AsRef<[Vec<u8>]>> NamedFrom<T, [Vec<u8>]> for ChunkedArray<BinaryType>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[bool]>> NamedFrom<T, [bool]> for ChunkedArray<BooleanType>
impl<T: AsRef<[bool]>> NamedFrom<T, [bool]> for ChunkedArray<BooleanType>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[f32]>> NamedFrom<T, [f32]> for ChunkedArray<Float32Type>
impl<T: AsRef<[f32]>> NamedFrom<T, [f32]> for ChunkedArray<Float32Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[f64]>> NamedFrom<T, [f64]> for ChunkedArray<Float64Type>
impl<T: AsRef<[f64]>> NamedFrom<T, [f64]> for ChunkedArray<Float64Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[i128]>> NamedFrom<T, [i128]> for ChunkedArray<Int128Type>
impl<T: AsRef<[i128]>> NamedFrom<T, [i128]> for ChunkedArray<Int128Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[i32]>> NamedFrom<T, [i32]> for ChunkedArray<Int32Type>
impl<T: AsRef<[i32]>> NamedFrom<T, [i32]> for ChunkedArray<Int32Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[i64]>> NamedFrom<T, [i64]> for ChunkedArray<Int64Type>
impl<T: AsRef<[i64]>> NamedFrom<T, [i64]> for ChunkedArray<Int64Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[u32]>> NamedFrom<T, [u32]> for ChunkedArray<UInt32Type>
impl<T: AsRef<[u32]>> NamedFrom<T, [u32]> for ChunkedArray<UInt32Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T: AsRef<[u64]>> NamedFrom<T, [u64]> for ChunkedArray<UInt64Type>
impl<T: AsRef<[u64]>> NamedFrom<T, [u64]> for ChunkedArray<UInt64Type>
Source§fn new(name: PlSmallStr, v: T) -> Self
fn new(name: PlSmallStr, v: T) -> Self
Source§impl<T> NewChunkedArray<T, <T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> NewChunkedArray<T, <T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
Source§fn from_iter_values(
name: PlSmallStr,
it: impl Iterator<Item = T::Native>,
) -> ChunkedArray<T>
fn from_iter_values( name: PlSmallStr, it: impl Iterator<Item = T::Native>, ) -> ChunkedArray<T>
Create a new ChunkedArray from an iterator.
fn from_slice(name: PlSmallStr, v: &[T::Native]) -> Self
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>
fn from_iter_options( name: PlSmallStr, it: impl Iterator<Item = Option<T::Native>>, ) -> ChunkedArray<T>
Source§impl<T: NumOpsDispatchInner> NumOpsDispatch for ChunkedArray<T>
impl<T: NumOpsDispatchInner> NumOpsDispatch for ChunkedArray<T>
fn subtract(&self, rhs: &Series) -> PolarsResult<Series>
fn add_to(&self, rhs: &Series) -> PolarsResult<Series>
fn multiply(&self, rhs: &Series) -> PolarsResult<Series>
fn divide(&self, rhs: &Series) -> PolarsResult<Series>
fn remainder(&self, rhs: &Series) -> PolarsResult<Series>
Source§impl<S: NumOpsDispatchCheckedInner> NumOpsDispatchChecked for ChunkedArray<S>
Available on crate feature checked_arithmetic
only.
impl<S: NumOpsDispatchCheckedInner> NumOpsDispatchChecked for ChunkedArray<S>
checked_arithmetic
only.Source§fn checked_div(&self, rhs: &Series) -> PolarsResult<Series>
fn checked_div(&self, rhs: &Series) -> PolarsResult<Series>
fn checked_div_num<T: ToPrimitive>(&self, rhs: T) -> PolarsResult<Series>
Source§impl<T> QuantileAggSeries for ChunkedArray<T>
impl<T> QuantileAggSeries for ChunkedArray<T>
Source§fn quantile_reduce(
&self,
quantile: f64,
method: QuantileMethod,
) -> PolarsResult<Scalar>
fn quantile_reduce( &self, quantile: f64, method: QuantileMethod, ) -> PolarsResult<Scalar>
ChunkedArray
as a new Series
of length 1.Source§fn median_reduce(&self) -> Scalar
fn median_reduce(&self) -> Scalar
ChunkedArray
as a new Series
of length 1.Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Rem<N> for &ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Rem<N> for &ChunkedArray<T>
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Rem<N> for ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Rem<N> for ChunkedArray<T>
Source§impl<T: PolarsNumericType> Rem for &ChunkedArray<T>
impl<T: PolarsNumericType> Rem for &ChunkedArray<T>
Source§impl<T: PolarsNumericType> Rem for ChunkedArray<T>
impl<T: PolarsNumericType> Rem for ChunkedArray<T>
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Sub<N> for &ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Sub<N> for &ChunkedArray<T>
Source§impl<T: PolarsNumericType, N: Num + ToPrimitive> Sub<N> for ChunkedArray<T>
impl<T: PolarsNumericType, N: Num + ToPrimitive> Sub<N> for ChunkedArray<T>
Source§impl<T: PolarsNumericType> Sub for &ChunkedArray<T>
impl<T: PolarsNumericType> Sub for &ChunkedArray<T>
Source§impl<T: PolarsNumericType> Sub for ChunkedArray<T>
impl<T: PolarsNumericType> Sub for ChunkedArray<T>
Source§impl<T> VarAggSeries for ChunkedArray<T>
impl<T> VarAggSeries for ChunkedArray<T>
Source§fn var_reduce(&self, ddof: u8) -> Scalar
fn var_reduce(&self, ddof: u8) -> Scalar
ChunkedArray
as a new Series
of length 1.Source§fn std_reduce(&self, ddof: u8) -> Scalar
fn std_reduce(&self, ddof: u8) -> Scalar
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, C> CompactStringExt for C
impl<I, C> CompactStringExt for C
Source§fn concat_compact(&self) -> CompactString
fn concat_compact(&self) -> CompactString
CompactString
Read moreSource§fn join_compact<S>(&self, separator: S) -> CompactString
fn join_compact<S>(&self, separator: S) -> CompactString
CompactString
Read moreSource§impl<T> IntoColumn for Twhere
T: IntoSeries,
impl<T> IntoColumn for Twhere
T: IntoSeries,
fn into_column(self) -> Column
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>
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>
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