Struct polars_core::chunked_array::ChunkedArray
source · [−]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(ca: &Float32Chunked) -> Float32Chunked {
ca.apply(|v| v.cos())
}
If we would like to cast the result we could use a Rust Iterator instead of an apply
method.
Note that Iterators are slightly slower as the null values aren’t ignored implicitly.
fn apply_cosine_and_cast(ca: &Float32Chunked) -> Float64Chunked {
ca.into_iter()
.map(|opt_v| {
opt_v.map(|v| v.cos() as f64)
}).collect()
}
Another option is to first cast and then use an apply.
fn apply_cosine_and_cast(ca: &Float32Chunked) -> Float64Chunked {
ca.apply_cast_numeric(|v| v.cos() as f64)
}
Conversion between Series and ChunkedArray’s
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.into_iter()
.for_each(|opt_v| println!("{:?}", opt_v))
}
fn iter_backward(ca: &Float32Chunked) {
ca.into_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 ChunkArray
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 ChunkArray'
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.
Implementations
sourceimpl<T: PolarsNumericType> ChunkedArray<T>where
T::Native: Signed,
impl<T: PolarsNumericType> ChunkedArray<T>where
T::Native: Signed,
sourceimpl<T> ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
sourcepub fn append(&mut self, other: &Self)
pub fn append(&mut self, other: &Self)
Append in place. This is done by adding the chunks of other
to this ChunkedArray
.
See also extend
for appends to the underlying memory
sourceimpl<T: PolarsNumericType> ChunkedArray<T>
impl<T: PolarsNumericType> ChunkedArray<T>
sourcepub fn cast_and_apply_in_place<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(S::Native) -> S::Native + Copy,
S: PolarsNumericType,
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.
sourceimpl<T: PolarsNumericType> ChunkedArray<T>
impl<T: PolarsNumericType> ChunkedArray<T>
sourceimpl<T: PolarsDataType> ChunkedArray<T>
impl<T: PolarsDataType> ChunkedArray<T>
pub fn rechunk(&self) -> Self
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
sourceimpl<T> ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
sourcepub fn extend(&mut self, other: &Self)
pub fn extend(&mut self, other: &Self)
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
.
sourceimpl ChunkedArray<ListType>
impl ChunkedArray<ListType>
pub fn full_null_with_dtype(
name: &str,
length: usize,
inner_dtype: &DataType
) -> ListChunked
sourceimpl<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_apply_float<F>(
&self,
window_size: usize,
f: F
) -> PolarsResult<Self>where
F: FnMut(&mut ChunkedArray<T>) -> Option<T::Native>,
pub fn rolling_apply_float<F>(
&self,
window_size: usize,
f: F
) -> PolarsResult<Self>where
F: FnMut(&mut ChunkedArray<T>) -> Option<T::Native>,
Apply a rolling custom function. This is pretty slow because of dynamic dispatch.
sourceimpl<T> ChunkedArray<T>where
T: PolarsFloatType,
T::Native: Float,
impl<T> ChunkedArray<T>where
T: PolarsFloatType,
T::Native: Float,
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.
sourceimpl 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>> + '_
sourceimpl ChunkedArray<Utf8Type>
impl ChunkedArray<Utf8Type>
pub fn par_iter_indexed(
&self
) -> impl IndexedParallelIterator<Item = Option<&str>>
pub fn par_iter(&self) -> impl ParallelIterator<Item = Option<&str>> + '_
sourceimpl<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
sourceimpl 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.
sourceimpl<T> ChunkedArray<T>where
T: PolarsDataType,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
sourcepub fn from_chunks(name: &str, chunks: Vec<ArrayRef>) -> Self
pub fn from_chunks(name: &str, chunks: Vec<ArrayRef>) -> Self
Create a new ChunkedArray from existing chunks.
sourceimpl<T> ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl 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 save allocations.
A Series is:
1. Arc
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.
sourcepub fn apply_amortized<'a, F>(&'a self, f: F) -> Selfwhere
F: FnMut(UnstableSeries<'a>) -> Series,
pub fn apply_amortized<'a, F>(&'a self, f: F) -> Selfwhere
F: FnMut(UnstableSeries<'a>) -> Series,
Apply a closure F
elementwise.
pub fn try_apply_amortized<'a, F>(&'a self, f: F) -> PolarsResult<Self>where
F: FnMut(UnstableSeries<'a>) -> PolarsResult<Series>,
sourceimpl ChunkedArray<ListType>
impl ChunkedArray<ListType>
pub fn set_fast_explode(&mut self)
pub fn to_logical(&mut self, inner_dtype: DataType)
sourceimpl<T> ChunkedArray<ObjectType<T>>where
T: PolarsObject,
impl<T> ChunkedArray<ObjectType<T>>where
T: PolarsObject,
pub fn new_from_vec(name: &str, v: Vec<T>) -> Self
object
only.sourceimpl<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.
sourceimpl<T> ChunkedArray<T>where
T: PolarsNumericType,
Standard: Distribution<T::Native>,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
Standard: Distribution<T::Native>,
sourceimpl<T> ChunkedArray<T>where
T: PolarsDataType,
ChunkedArray<T>: ChunkTake,
impl<T> ChunkedArray<T>where
T: PolarsDataType,
ChunkedArray<T>: ChunkTake,
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.
sourceimpl<T> ChunkedArray<T>where
T: PolarsNumericType,
T::Native: Float,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
T::Native: Float,
sourcepub fn rand_normal(
name: &str,
length: usize,
mean: f64,
std_dev: f64
) -> PolarsResult<Self>
Available on crate feature random
only.
pub fn rand_normal(
name: &str,
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: &str, length: usize) -> Self
Available on crate feature random
only.
pub fn rand_standard_normal(name: &str, length: usize) -> Self
random
only.Create ChunkedArray
with samples from a Standard Normal distribution.
sourceimpl ChunkedArray<BooleanType>
impl ChunkedArray<BooleanType>
sourcepub fn rand_bernoulli(name: &str, length: usize, p: f64) -> PolarsResult<Self>
Available on crate feature random
only.
pub fn rand_bernoulli(name: &str, length: usize, p: f64) -> PolarsResult<Self>
random
only.Create ChunkedArray
with samples from a Bernoulli distribution.
sourceimpl ChunkedArray<Utf8Type>
impl ChunkedArray<Utf8Type>
pub fn hex_decode(&self, strict: Option<bool>) -> PolarsResult<Utf8Chunked>
pub fn hex_encode(&self) -> Utf8Chunked
pub fn base64_decode(&self, strict: Option<bool>) -> PolarsResult<Utf8Chunked>
pub fn base64_encode(&self) -> Utf8Chunked
sourceimpl<T: PolarsDataType> ChunkedArray<T>
impl<T: PolarsDataType> ChunkedArray<T>
sourcepub fn set_sorted(&mut self, reverse: bool)
pub fn set_sorted(&mut self, reverse: bool)
Set the ‘sorted’ bit meta info.
pub fn is_sorted2(&self) -> IsSorted
pub fn set_sorted2(&mut self, sorted: IsSorted)
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.
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_validity(&self) -> bool
pub fn has_validity(&self) -> bool
Return if any the chunks in this [ChunkedArray]
have a validity bitmap.
no bitmap means no null values.
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrink the capacity of this array to fit its length.
sourcepub fn unpack_series_matching_type(
&self,
series: &Series
) -> PolarsResult<&ChunkedArray<T>>
pub fn unpack_series_matching_type(
&self,
series: &Series
) -> PolarsResult<&ChunkedArray<T>>
Series to ChunkedArray
sourcepub fn chunk_id(&self) -> ChunkIdIter<'_>
pub fn chunk_id(&self) -> ChunkIdIter<'_>
Unique id representing the number of chunks
sourcepub fn chunks(&self) -> &Vec<ArrayRef>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn chunks(&self) -> &Vec<ArrayRef>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
A reference to the chunks
sourcepub unsafe fn chunks_mut(&mut self) -> &mut Vec<ArrayRef>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub unsafe fn chunks_mut(&mut self) -> &mut Vec<ArrayRef>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
A mutable reference to the chunks
Safety
The caller must ensure to not change the DataType
or length
of any of the chunks.
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 null_count(&self) -> usize
pub fn null_count(&self) -> usize
Count the null values.
sourcepub fn append_array(&mut self, other: ArrayRef) -> PolarsResult<()>
pub fn append_array(&mut self, other: ArrayRef) -> PolarsResult<()>
Append arrow array in place.
let mut array = Int32Chunked::new("array", &[1, 2]);
let array_2 = Int32Chunked::new("2nd", &[3]);
array.append(&array_2);
assert_eq!(Vec::from(&array), [Some(1), Some(2), Some(3)])
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.
sourceimpl<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]>
Contiguous slice
sourcepub fn data_views(
&self
) -> impl Iterator<Item = &[T::Native]> + DoubleEndedIterator
pub fn data_views(
&self
) -> impl Iterator<Item = &[T::Native]> + DoubleEndedIterator
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 Iterator<Item = T::Native> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen
sourceimpl 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)
sourceimpl<T: PolarsNumericType> ChunkedArray<T>
impl<T: PolarsNumericType> ChunkedArray<T>
sourceimpl<T> ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
impl<T> ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
We cannot override the left hand side behaviour. So we create a trait LhsNumOps. This allows for 1.add(&Series)
Trait Implementations
sourceimpl<T> Add<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Add<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl Add<&ChunkedArray<Utf8Type>> for &Utf8Chunked
impl Add<&ChunkedArray<Utf8Type>> for &Utf8Chunked
sourceimpl<T> Add<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Add<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl Add<ChunkedArray<Utf8Type>> for Utf8Chunked
impl Add<ChunkedArray<Utf8Type>> for Utf8Chunked
sourceimpl<T, N> Add<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Add<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl<T, N> Add<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Add<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl<T> AggList for ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
impl<T> AggList for ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
sourceunsafe fn agg_list(&self, groups: &GroupsProxy) -> Series
unsafe fn agg_list(&self, groups: &GroupsProxy) -> Series
sourceimpl<T> ArgAgg for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ArgAgg for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<'a, T> AsMut<ChunkedArray<T>> for dyn SeriesTrait + 'awhere
T: 'static + PolarsDataType,
impl<'a, T> AsMut<ChunkedArray<T>> for dyn SeriesTrait + 'awhere
T: 'static + PolarsDataType,
sourcefn as_mut(&mut self) -> &mut ChunkedArray<T>
fn as_mut(&mut self) -> &mut ChunkedArray<T>
sourceimpl<T: PolarsDataType> AsRef<ChunkedArray<T>> for ChunkedArray<T>
impl<T: PolarsDataType> AsRef<ChunkedArray<T>> for ChunkedArray<T>
sourcefn as_ref(&self) -> &ChunkedArray<T>
fn as_ref(&self) -> &ChunkedArray<T>
sourceimpl<'a, T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + 'awhere
T: 'static + PolarsDataType,
impl<'a, T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + 'awhere
T: 'static + PolarsDataType,
sourcefn as_ref(&self) -> &ChunkedArray<T>
fn as_ref(&self) -> &ChunkedArray<T>
sourceimpl BitAnd<&ChunkedArray<BooleanType>> for &BooleanChunked
impl BitAnd<&ChunkedArray<BooleanType>> for &BooleanChunked
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
&
operator.sourceimpl<T> BitAnd<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: BitAnd<Output = T::Native>,
impl<T> BitAnd<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: BitAnd<Output = T::Native>,
sourceimpl BitAnd<ChunkedArray<BooleanType>> for BooleanChunked
impl BitAnd<ChunkedArray<BooleanType>> for BooleanChunked
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
&
operator.sourceimpl BitOr<&ChunkedArray<BooleanType>> for &BooleanChunked
impl BitOr<&ChunkedArray<BooleanType>> for &BooleanChunked
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
|
operator.sourceimpl<T> BitOr<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: BitOr<Output = T::Native>,
impl<T> BitOr<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: BitOr<Output = T::Native>,
sourceimpl BitOr<ChunkedArray<BooleanType>> for BooleanChunked
impl BitOr<ChunkedArray<BooleanType>> for BooleanChunked
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
|
operator.sourceimpl BitXor<&ChunkedArray<BooleanType>> for &BooleanChunked
impl BitXor<&ChunkedArray<BooleanType>> for &BooleanChunked
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
^
operator.sourceimpl<T> BitXor<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: BitXor<Output = T::Native>,
impl<T> BitXor<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: BitXor<Output = T::Native>,
sourceimpl BitXor<ChunkedArray<BooleanType>> for BooleanChunked
impl BitXor<ChunkedArray<BooleanType>> for BooleanChunked
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
^
operator.sourceimpl<T> ChunkAgg<<T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
impl<T> ChunkAgg<<T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
sourcefn sum(&self) -> Option<T::Native>
fn sum(&self) -> Option<T::Native>
None
if the array is empty or only contains null values. Read morefn min(&self) -> Option<T::Native>
sourceimpl<T> ChunkAggSeries for ChunkedArray<T>where
T: PolarsNumericType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
ChunkedArray<T>: IntoSeries,
impl<T> ChunkAggSeries for ChunkedArray<T>where
T: PolarsNumericType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
ChunkedArray<T>: IntoSeries,
sourcefn sum_as_series(&self) -> Series
fn sum_as_series(&self) -> Series
sourcefn max_as_series(&self) -> Series
fn max_as_series(&self) -> Series
sourcefn min_as_series(&self) -> Series
fn min_as_series(&self) -> Series
sourcefn prod_as_series(&self) -> Series
fn prod_as_series(&self) -> Series
sourceimpl<T> ChunkAnyValue for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkAnyValue for ChunkedArray<T>where
T: PolarsNumericType,
sourceunsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
sourcefn get_any_value(&self, index: usize) -> AnyValue<'_>
fn get_any_value(&self, index: usize) -> AnyValue<'_>
sourceimpl<'a, T> ChunkApply<'a, <T as PolarsNumericType>::Native, <T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
impl<'a, T> ChunkApply<'a, <T as PolarsNumericType>::Native, <T as PolarsNumericType>::Native> for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(T::Native) -> S::Native + Copy,
S: PolarsNumericType,
fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(T::Native) -> S::Native + Copy,
S: PolarsNumericType,
sourcefn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(Option<T::Native>) -> S::Native,
S: PolarsNumericType,
fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S>where
F: Fn(Option<T::Native>) -> S::Native,
S: PolarsNumericType,
sourcefn apply<F>(&'a self, f: F) -> Selfwhere
F: Fn(T::Native) -> T::Native + Copy,
fn apply<F>(&'a self, f: F) -> Selfwhere
F: Fn(T::Native) -> T::Native + Copy,
fn try_apply<F>(&'a self, f: F) -> PolarsResult<Self>where
F: Fn(T::Native) -> PolarsResult<T::Native> + Copy,
sourcefn apply_on_opt<F>(&'a self, f: F) -> Selfwhere
F: Fn(Option<T::Native>) -> Option<T::Native> + Copy,
fn apply_on_opt<F>(&'a self, f: F) -> Selfwhere
F: Fn(Option<T::Native>) -> Option<T::Native> + Copy,
sourcefn apply_with_idx<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, T::Native)) -> T::Native + Copy,
fn apply_with_idx<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, T::Native)) -> T::Native + Copy,
sourceimpl<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,
sourcefn apply_kernel(
&self,
f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef
) -> Self
fn apply_kernel(
&self,
f: &dyn Fn(&PrimitiveArray<T::Native>) -> ArrayRef
) -> Self
sourcefn 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,
sourceimpl<T> ChunkCast for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkCast for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn cast(&self, data_type: &DataType) -> PolarsResult<Series>
fn cast(&self, data_type: &DataType) -> PolarsResult<Series>
[ChunkedArray]
to [DataType]
sourcefn cast_unchecked(&self, data_type: &DataType) -> PolarsResult<Series>
fn cast_unchecked(&self, data_type: &DataType) -> PolarsResult<Series>
sourceimpl ChunkCompare<&ChunkedArray<BooleanType>> for BooleanChunked
impl ChunkCompare<&ChunkedArray<BooleanType>> for BooleanChunked
type Item = ChunkedArray<BooleanType>
sourcefn eq_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
fn eq_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
sourcefn equal(&self, rhs: &BooleanChunked) -> BooleanChunked
fn equal(&self, rhs: &BooleanChunked) -> BooleanChunked
sourcefn not_equal(&self, rhs: &BooleanChunked) -> BooleanChunked
fn not_equal(&self, rhs: &BooleanChunked) -> BooleanChunked
sourcefn gt(&self, rhs: &BooleanChunked) -> BooleanChunked
fn gt(&self, rhs: &BooleanChunked) -> BooleanChunked
sourcefn gt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
fn gt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
sourcefn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
fn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
sourcefn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
fn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
sourceimpl ChunkCompare<&ChunkedArray<ListType>> for ListChunked
impl ChunkCompare<&ChunkedArray<ListType>> for ListChunked
type Item = ChunkedArray<BooleanType>
sourcefn eq_missing(&self, rhs: &ListChunked) -> BooleanChunked
fn eq_missing(&self, rhs: &ListChunked) -> BooleanChunked
sourcefn equal(&self, rhs: &ListChunked) -> BooleanChunked
fn equal(&self, rhs: &ListChunked) -> BooleanChunked
sourcefn not_equal(&self, rhs: &ListChunked) -> BooleanChunked
fn not_equal(&self, rhs: &ListChunked) -> BooleanChunked
sourcefn gt(&self, _rhs: &ListChunked) -> BooleanChunked
fn gt(&self, _rhs: &ListChunked) -> BooleanChunked
sourcefn gt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
fn gt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
sourcefn lt(&self, _rhs: &ListChunked) -> BooleanChunked
fn lt(&self, _rhs: &ListChunked) -> BooleanChunked
sourcefn lt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
fn lt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
sourceimpl<T> ChunkCompare<&ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkCompare<&ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
type Item = ChunkedArray<BooleanType>
sourcefn eq_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn eq_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
sourcefn equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
sourcefn not_equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn not_equal(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
sourcefn gt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn gt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
sourcefn gt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn gt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
sourcefn lt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn lt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
sourcefn lt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
fn lt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
sourceimpl ChunkCompare<&ChunkedArray<Utf8Type>> for Utf8Chunked
impl ChunkCompare<&ChunkedArray<Utf8Type>> for Utf8Chunked
type Item = ChunkedArray<BooleanType>
sourcefn eq_missing(&self, rhs: &Utf8Chunked) -> BooleanChunked
fn eq_missing(&self, rhs: &Utf8Chunked) -> BooleanChunked
sourcefn equal(&self, rhs: &Utf8Chunked) -> BooleanChunked
fn equal(&self, rhs: &Utf8Chunked) -> BooleanChunked
sourcefn not_equal(&self, rhs: &Utf8Chunked) -> BooleanChunked
fn not_equal(&self, rhs: &Utf8Chunked) -> BooleanChunked
sourcefn gt(&self, rhs: &Utf8Chunked) -> BooleanChunked
fn gt(&self, rhs: &Utf8Chunked) -> BooleanChunked
sourcefn gt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
fn gt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
sourcefn lt(&self, rhs: &Utf8Chunked) -> BooleanChunked
fn lt(&self, rhs: &Utf8Chunked) -> BooleanChunked
sourcefn lt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
fn lt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
sourceimpl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T>where
T: PolarsNumericType,
Rhs: ToPrimitive,
impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T>where
T: PolarsNumericType,
Rhs: ToPrimitive,
type Item = ChunkedArray<BooleanType>
sourcefn eq_missing(&self, rhs: Rhs) -> BooleanChunked
fn eq_missing(&self, rhs: Rhs) -> BooleanChunked
sourcefn equal(&self, rhs: Rhs) -> BooleanChunked
fn equal(&self, rhs: Rhs) -> BooleanChunked
sourcefn not_equal(&self, rhs: Rhs) -> BooleanChunked
fn not_equal(&self, rhs: Rhs) -> BooleanChunked
sourcefn gt(&self, rhs: Rhs) -> BooleanChunked
fn gt(&self, rhs: Rhs) -> BooleanChunked
sourcefn gt_eq(&self, rhs: Rhs) -> BooleanChunked
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
sourcefn lt(&self, rhs: Rhs) -> BooleanChunked
fn lt(&self, rhs: Rhs) -> BooleanChunked
sourcefn lt_eq(&self, rhs: Rhs) -> BooleanChunked
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
sourceimpl<T> ChunkCumAgg<T> for ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: FromIterator<Option<T::Native>>,
impl<T> ChunkCumAgg<T> for ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: FromIterator<Option<T::Native>>,
sourcefn cummax(&self, reverse: bool) -> ChunkedArray<T>
fn cummax(&self, reverse: bool) -> ChunkedArray<T>
sourcefn cummin(&self, reverse: bool) -> ChunkedArray<T>
fn cummin(&self, reverse: bool) -> ChunkedArray<T>
sourcefn cumsum(&self, reverse: bool) -> ChunkedArray<T>
fn cumsum(&self, reverse: bool) -> ChunkedArray<T>
sourcefn cumprod(&self, reverse: bool) -> ChunkedArray<T>
fn cumprod(&self, reverse: bool) -> ChunkedArray<T>
sourceimpl<T: PolarsDataType> ChunkExpandAtIndex<T> for ChunkedArray<T>where
ChunkedArray<T>: ChunkFull<T::Native> + TakeRandom<Item = T::Native>,
T: PolarsNumericType,
impl<T: PolarsDataType> ChunkExpandAtIndex<T> for ChunkedArray<T>where
ChunkedArray<T>: ChunkFull<T::Native> + TakeRandom<Item = T::Native>,
T: PolarsNumericType,
sourcefn new_from_index(&self, index: usize, length: usize) -> ChunkedArray<T>
fn new_from_index(&self, index: usize, length: usize) -> ChunkedArray<T>
sourceimpl<T> ChunkFillNull for ChunkedArray<T>where
T: PolarsNumericType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
impl<T> ChunkFillNull for ChunkedArray<T>where
T: PolarsNumericType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
sourcefn fill_null(&self, strategy: FillNullStrategy) -> PolarsResult<Self>
fn fill_null(&self, strategy: FillNullStrategy) -> PolarsResult<Self>
sourceimpl<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,
sourcefn fill_null_with_values(&self, value: T::Native) -> PolarsResult<Self>
fn fill_null_with_values(&self, value: T::Native) -> PolarsResult<Self>
T
.sourceimpl<T> ChunkFilter<T> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkFilter<T> for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn filter(&self, filter: &BooleanChunked) -> PolarsResult<ChunkedArray<T>>
fn filter(&self, filter: &BooleanChunked) -> PolarsResult<ChunkedArray<T>>
sourceimpl<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,
sourceimpl<T> ChunkFullNull for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkFullNull for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T> ChunkPeaks for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkPeaks for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn peak_max(&self) -> BooleanChunked
fn peak_max(&self) -> BooleanChunked
Get a boolean mask of the local maximum peaks.
sourcefn peak_min(&self) -> BooleanChunked
fn peak_min(&self) -> BooleanChunked
Get a boolean mask of the local minimum peaks.
sourceimpl<T> ChunkQuantile<f64> for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: Ord,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
impl<T> ChunkQuantile<f64> for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: Ord,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
sourcefn quantile(
&self,
quantile: f64,
interpol: QuantileInterpolOptions
) -> PolarsResult<Option<f64>>
fn quantile(
&self,
quantile: f64,
interpol: QuantileInterpolOptions
) -> PolarsResult<Option<f64>>
None
if the array is empty or only contains null values. Read moresourceimpl<T> ChunkReverse<T> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkReverse<T> for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn reverse(&self) -> ChunkedArray<T>
fn reverse(&self) -> ChunkedArray<T>
sourceimpl<T> ChunkRollApply for ChunkedArray<T>where
T: PolarsNumericType,
Self: IntoSeries,
impl<T> ChunkRollApply for ChunkedArray<T>where
T: PolarsNumericType,
Self: IntoSeries,
sourcefn rolling_apply(
&self,
f: &dyn Fn(&Series) -> Series,
options: RollingOptionsFixedWindow
) -> PolarsResult<Series>
fn rolling_apply(
&self,
f: &dyn Fn(&Series) -> Series,
options: RollingOptionsFixedWindow
) -> PolarsResult<Series>
Apply a rolling custom function. This is pretty slow because of dynamic dispatch.
sourceimpl<'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,
sourcefn set_at_idx<I: IntoIterator<Item = IdxSize>>(
&'a self,
idx: I,
value: Option<T::Native>
) -> PolarsResult<Self>
fn set_at_idx<I: IntoIterator<Item = IdxSize>>(
&'a self,
idx: I,
value: Option<T::Native>
) -> PolarsResult<Self>
sourcefn set_at_idx_with<I: IntoIterator<Item = IdxSize>, F>(
&'a self,
idx: I,
f: F
) -> PolarsResult<Self>where
F: Fn(Option<T::Native>) -> Option<T::Native>,
fn set_at_idx_with<I: IntoIterator<Item = IdxSize>, F>(
&'a self,
idx: I,
f: F
) -> PolarsResult<Self>where
F: Fn(Option<T::Native>) -> Option<T::Native>,
idx
by applying a closure to these values. Read moresourcefn set(
&'a self,
mask: &BooleanChunked,
value: Option<T::Native>
) -> PolarsResult<Self>
fn set(
&'a self,
mask: &BooleanChunked,
value: Option<T::Native>
) -> PolarsResult<Self>
sourceimpl<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>
sourceimpl<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,
sourcefn 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
. Read moresourceimpl<T> ChunkSort<T> for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: Default + Ord,
impl<T> ChunkSort<T> for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: Default + Ord,
sourcefn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> PolarsResult<IdxCa>
fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> 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>
sourcefn sort(&self, reverse: bool) -> ChunkedArray<T>
fn sort(&self, reverse: bool) -> ChunkedArray<T>
ChunkedArray
.sourcefn argsort(&self, options: SortOptions) -> IdxCa
fn argsort(&self, options: SortOptions) -> IdxCa
sourceimpl<T> ChunkTake for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkTake for ChunkedArray<T>where
T: PolarsNumericType,
sourceunsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Selfwhere
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Selfwhere
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
sourcefn take<I, INulls>(&self, indices: TakeIdx<'_, I, INulls>) -> PolarsResult<Self>where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
fn take<I, INulls>(&self, indices: TakeIdx<'_, I, INulls>) -> PolarsResult<Self>where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
sourceimpl<T> ChunkTakeEvery<T> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkTakeEvery<T> for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn take_every(&self, n: usize) -> ChunkedArray<T>
fn take_every(&self, n: usize) -> ChunkedArray<T>
sourceimpl<T> ChunkUnique<T> for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: Hash + Eq + Ord,
ChunkedArray<T>: IntoSeries,
impl<T> ChunkUnique<T> for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: Hash + Eq + Ord,
ChunkedArray<T>: IntoSeries,
sourcefn unique(&self) -> PolarsResult<Self>
fn unique(&self) -> PolarsResult<Self>
sourcefn arg_unique(&self) -> PolarsResult<IdxCa>
fn arg_unique(&self) -> PolarsResult<IdxCa>
ChunkedArray
.
This Vec is sorted. Read moresourcefn is_unique(&self) -> PolarsResult<BooleanChunked>
fn is_unique(&self) -> PolarsResult<BooleanChunked>
sourcefn is_duplicated(&self) -> PolarsResult<BooleanChunked>
fn is_duplicated(&self) -> PolarsResult<BooleanChunked>
sourcefn n_unique(&self) -> PolarsResult<usize>
fn n_unique(&self) -> PolarsResult<usize>
ChunkedArray
sourcefn mode(&self) -> PolarsResult<Self>
fn mode(&self) -> PolarsResult<Self>
mode
only.sourceimpl<T> ChunkVar<f64> for ChunkedArray<T>where
T: PolarsIntegerType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
impl<T> ChunkVar<f64> for ChunkedArray<T>where
T: PolarsIntegerType,
<T::Native as Simd>::Simd: Add<Output = <T::Native as Simd>::Simd> + Sum<T::Native> + SimdOrd<T::Native>,
sourceimpl<T> ChunkZip<T> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> ChunkZip<T> for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn 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
Read moresourceimpl<T: PolarsDataType> Clone for ChunkedArray<T>
impl<T: PolarsDataType> Clone for ChunkedArray<T>
sourceimpl Debug for ChunkedArray<BooleanType>
impl Debug for ChunkedArray<BooleanType>
sourceimpl<T> Debug for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Debug for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T: PolarsDataType> Default for ChunkedArray<T>
impl<T: PolarsDataType> Default for ChunkedArray<T>
sourceimpl<T> Div<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Div<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T> Div<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Div<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T, N> Div<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Div<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl<T, N> Div<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Div<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl<T: PolarsDataType> Drop for ChunkedArray<T>
impl<T: PolarsDataType> Drop for ChunkedArray<T>
sourceimpl<'a> From<&'a ChunkedArray<BooleanType>> for Vec<Option<bool>>
impl<'a> From<&'a ChunkedArray<BooleanType>> for Vec<Option<bool>>
sourcefn from(ca: &'a BooleanChunked) -> Self
fn from(ca: &'a BooleanChunked) -> Self
sourceimpl<'a, T> From<&'a ChunkedArray<T>> for Vec<Option<T::Native>>where
T: PolarsNumericType,
impl<'a, T> From<&'a ChunkedArray<T>> for Vec<Option<T::Native>>where
T: PolarsNumericType,
sourcefn from(ca: &'a ChunkedArray<T>) -> Self
fn from(ca: &'a ChunkedArray<T>) -> Self
sourceimpl<'a> From<&'a ChunkedArray<UInt32Type>> for TakeIdx<'a, Dummy<usize>, Dummy<Option<usize>>>
impl<'a> From<&'a ChunkedArray<UInt32Type>> for TakeIdx<'a, Dummy<usize>, Dummy<Option<usize>>>
Conversion from UInt32Chunked to Unchecked TakeIdx
sourceimpl<'a> From<&'a ChunkedArray<Utf8Type>> for Vec<Option<&'a str>>
impl<'a> From<&'a ChunkedArray<Utf8Type>> for Vec<Option<&'a str>>
From trait
sourcefn from(ca: &'a Utf8Chunked) -> Self
fn from(ca: &'a Utf8Chunked) -> Self
sourceimpl<T: PolarsNumericType> From<&[<T as PolarsNumericType>::Native]> for ChunkedArray<T>
impl<T: PolarsNumericType> From<&[<T as PolarsNumericType>::Native]> for ChunkedArray<T>
sourceimpl<T: PolarsNumericType> From<(&str, PrimitiveArray<<T as PolarsNumericType>::Native>)> for ChunkedArray<T>
impl<T: PolarsNumericType> From<(&str, PrimitiveArray<<T as PolarsNumericType>::Native>)> for ChunkedArray<T>
sourcefn from(tpl: (&str, PrimitiveArray<T::Native>)) -> Self
fn from(tpl: (&str, PrimitiveArray<T::Native>)) -> Self
sourceimpl From<ChunkedArray<BooleanType>> for Vec<Option<bool>>
impl From<ChunkedArray<BooleanType>> for Vec<Option<bool>>
sourcefn from(ca: BooleanChunked) -> Self
fn from(ca: BooleanChunked) -> Self
sourceimpl<T> From<ChunkedArray<T>> for Serieswhere
T: PolarsDataType,
ChunkedArray<T>: IntoSeries,
impl<T> From<ChunkedArray<T>> for Serieswhere
T: PolarsDataType,
ChunkedArray<T>: IntoSeries,
sourcefn from(ca: ChunkedArray<T>) -> Self
fn from(ca: ChunkedArray<T>) -> Self
sourceimpl From<ChunkedArray<Utf8Type>> for Vec<Option<String>>
impl From<ChunkedArray<Utf8Type>> for Vec<Option<String>>
sourcefn from(ca: Utf8Chunked) -> Self
fn from(ca: Utf8Chunked) -> Self
sourceimpl<T: PolarsNumericType> From<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T>
impl<T: PolarsNumericType> From<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T>
sourcefn from(a: PrimitiveArray<T::Native>) -> Self
fn from(a: PrimitiveArray<T::Native>) -> Self
sourceimpl<T> FromIterator<(Vec<<T as PolarsNumericType>::Native, Global>, Option<Bitmap>)> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> FromIterator<(Vec<<T as PolarsNumericType>::Native, Global>, Option<Bitmap>)> for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<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
sourceimpl FromIterator<Option<bool>> for ChunkedArray<BooleanType>
impl FromIterator<Option<bool>> for ChunkedArray<BooleanType>
sourceimpl<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
sourceimpl<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,
sourcefn 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 moresourceimpl<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
) -> Self
sourceimpl 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,
sourceimpl Interpolate for ChunkedArray<Float32Type>
impl Interpolate for ChunkedArray<Float32Type>
fn interpolate(&self) -> Self
sourceimpl Interpolate for ChunkedArray<Float64Type>
impl Interpolate for ChunkedArray<Float64Type>
fn interpolate(&self) -> Self
sourceimpl Interpolate for ChunkedArray<Int32Type>
impl Interpolate for ChunkedArray<Int32Type>
fn interpolate(&self) -> Self
sourceimpl Interpolate for ChunkedArray<Int64Type>
impl Interpolate for ChunkedArray<Int64Type>
fn interpolate(&self) -> Self
sourceimpl Interpolate for ChunkedArray<UInt32Type>
impl Interpolate for ChunkedArray<UInt32Type>
fn interpolate(&self) -> Self
sourceimpl Interpolate for ChunkedArray<UInt64Type>
impl Interpolate for ChunkedArray<UInt64Type>
fn interpolate(&self) -> Self
sourceimpl<T> IntoGroupsProxy for ChunkedArray<T>where
T: PolarsNumericType,
T::Native: NumCast,
impl<T> IntoGroupsProxy for ChunkedArray<T>where
T: PolarsNumericType,
T::Native: NumCast,
sourcefn group_tuples(
&self,
multithreaded: bool,
sorted: bool
) -> PolarsResult<GroupsProxy>
fn group_tuples(
&self,
multithreaded: bool,
sorted: bool
) -> PolarsResult<GroupsProxy>
sourceimpl<'a, T> IntoIterator for &'a ChunkedArray<T>where
T: PolarsNumericType,
impl<'a, T> IntoIterator for &'a ChunkedArray<T>where
T: PolarsNumericType,
type Item = Option<<T as PolarsNumericType>::Native>
type Item = Option<<T as PolarsNumericType>::Native>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<T> as IntoIterator>::Item> + 'a, Global>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<T> as IntoIterator>::Item> + 'a, Global>
sourceimpl<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,
sourceimpl<'a, T> IntoTakeRandom<'a> for &'a ChunkedArray<T>where
T: PolarsNumericType,
impl<'a, T> IntoTakeRandom<'a> for &'a ChunkedArray<T>where
T: PolarsNumericType,
type Item = <T as PolarsNumericType>::Native
type TakeRandom = TakeRandBranch3<NumTakeRandomCont<'a, <T as PolarsNumericType>::Native>, NumTakeRandomSingleChunk<'a, <T as PolarsNumericType>::Native>, NumTakeRandomChunked<'a, <T as PolarsNumericType>::Native>>
sourcefn take_rand(&self) -> Self::TakeRandom
fn take_rand(&self) -> Self::TakeRandom
TakeRandom
.sourceimpl<T> IsFirst<T> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> IsFirst<T> for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn is_first(&self) -> PolarsResult<BooleanChunked>
fn is_first(&self) -> PolarsResult<BooleanChunked>
is_first
only.sourceimpl<T> IsIn for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> IsIn for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn is_in(&self, other: &Series) -> PolarsResult<BooleanChunked>
fn is_in(&self, other: &Series) -> PolarsResult<BooleanChunked>
is_in
only.sourceimpl<T> Mul<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Mul<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T> Mul<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Mul<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T, N> Mul<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Mul<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl<T, N> Mul<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Mul<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl NamedFrom<Range<u32>, UInt32Type> for ChunkedArray<UInt32Type>
impl NamedFrom<Range<u32>, UInt32Type> for ChunkedArray<UInt32Type>
sourceimpl NamedFrom<Range<u64>, UInt64Type> for ChunkedArray<UInt64Type>
impl NamedFrom<Range<u64>, UInt64Type> for ChunkedArray<UInt64Type>
sourceimpl<T: AsRef<[Option<bool>]>> NamedFrom<T, [Option<bool>]> for ChunkedArray<BooleanType>
impl<T: AsRef<[Option<bool>]>> NamedFrom<T, [Option<bool>]> for ChunkedArray<BooleanType>
sourceimpl<T: AsRef<[Option<f32>]>> NamedFrom<T, [Option<f32>]> for ChunkedArray<Float32Type>
impl<T: AsRef<[Option<f32>]>> NamedFrom<T, [Option<f32>]> for ChunkedArray<Float32Type>
sourceimpl<T: AsRef<[Option<f64>]>> NamedFrom<T, [Option<f64>]> for ChunkedArray<Float64Type>
impl<T: AsRef<[Option<f64>]>> NamedFrom<T, [Option<f64>]> for ChunkedArray<Float64Type>
sourceimpl<T: AsRef<[Option<u32>]>> NamedFrom<T, [Option<u32>]> for ChunkedArray<UInt32Type>
impl<T: AsRef<[Option<u32>]>> NamedFrom<T, [Option<u32>]> for ChunkedArray<UInt32Type>
sourceimpl<T: AsRef<[Option<u64>]>> NamedFrom<T, [Option<u64>]> for ChunkedArray<UInt64Type>
impl<T: AsRef<[Option<u64>]>> NamedFrom<T, [Option<u64>]> for ChunkedArray<UInt64Type>
sourceimpl<T: AsRef<[bool]>> NamedFrom<T, [bool]> for ChunkedArray<BooleanType>
impl<T: AsRef<[bool]>> NamedFrom<T, [bool]> for ChunkedArray<BooleanType>
sourceimpl<T: AsRef<[f32]>> NamedFrom<T, [f32]> for ChunkedArray<Float32Type>
impl<T: AsRef<[f32]>> NamedFrom<T, [f32]> for ChunkedArray<Float32Type>
sourceimpl<T: AsRef<[f64]>> NamedFrom<T, [f64]> for ChunkedArray<Float64Type>
impl<T: AsRef<[f64]>> NamedFrom<T, [f64]> for ChunkedArray<Float64Type>
sourceimpl<T: AsRef<[u32]>> NamedFrom<T, [u32]> for ChunkedArray<UInt32Type>
impl<T: AsRef<[u32]>> NamedFrom<T, [u32]> for ChunkedArray<UInt32Type>
sourceimpl<T: AsRef<[u64]>> NamedFrom<T, [u64]> for ChunkedArray<UInt64Type>
impl<T: AsRef<[u64]>> NamedFrom<T, [u64]> for ChunkedArray<UInt64Type>
sourceimpl<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,
sourcefn from_iter_values(
name: &str,
it: impl Iterator<Item = T::Native>
) -> ChunkedArray<T>
fn from_iter_values(
name: &str,
it: impl Iterator<Item = T::Native>
) -> ChunkedArray<T>
Create a new ChunkedArray from an iterator.
fn from_slice(name: &str, v: &[T::Native]) -> Self
fn from_slice_options(name: &str, opt_v: &[Option<T::Native>]) -> Self
sourcefn from_iter_options(
name: &str,
it: impl Iterator<Item = Option<T::Native>>
) -> ChunkedArray<T>
fn from_iter_options(
name: &str,
it: impl Iterator<Item = Option<T::Native>>
) -> ChunkedArray<T>
sourceimpl<T> NumOpsDispatch for ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
impl<T> NumOpsDispatch for ChunkedArray<T>where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
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>
sourceimpl<T> NumOpsDispatchChecked for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: CheckedDiv<Output = T::Native> + Zero + One,
ChunkedArray<T>: IntoSeries,
impl<T> NumOpsDispatchChecked for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: CheckedDiv<Output = T::Native> + Zero + One,
ChunkedArray<T>: IntoSeries,
sourcefn 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>
sourceimpl<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> + SimdOrd<T::Native>,
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> + SimdOrd<T::Native>,
sourcefn quantile_as_series(
&self,
quantile: f64,
interpol: QuantileInterpolOptions
) -> PolarsResult<Series>
fn quantile_as_series(
&self,
quantile: f64,
interpol: QuantileInterpolOptions
) -> PolarsResult<Series>
sourcefn median_as_series(&self) -> Series
fn median_as_series(&self) -> Series
sourceimpl<T> Rem<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Rem<&ChunkedArray<T>> for &ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T> Rem<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> Rem<ChunkedArray<T>> for ChunkedArray<T>where
T: PolarsNumericType,
sourceimpl<T, N> Rem<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Rem<N> for &ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl<T, N> Rem<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<T, N> Rem<N> for ChunkedArray<T>where
T: PolarsNumericType,
N: Num + ToPrimitive,
sourceimpl<T> RepeatBy for ChunkedArray<T>where
T: PolarsNumericType,
impl<T> RepeatBy for ChunkedArray<T>where
T: PolarsNumericType,
sourcefn repeat_by(&self, by: &IdxCa) -> ListChunked
fn repeat_by(&self, by: &IdxCa) -> ListChunked
repeat_by
only.n
times, where n
is determined by the values in by
.sourceimpl<T> StrConcat for ChunkedArray<T>where
T: PolarsNumericType,
T::Native: Display,
impl<T> StrConcat for ChunkedArray<T>where
T: PolarsNumericType,
T::Native: Display,
sourcefn str_concat(&self, delimiter: &str) -> Utf8Chunked
fn str_concat(&self, delimiter: &str) -> Utf8Chunked
concat_str
only.