Struct polars_core::chunked_array::ChunkedArray [−][src]
pub struct ChunkedArray<T> { /* fields omitted */ }
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.cast::<Float64Type>() .unwrap() .apply(|v| v.cos()) }
Conversion between Series and ChunkedArray’s
Conversion from a Series
to a ChunkedArray
is effortless.
fn to_chunked_array(series: &Series) -> Result<&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 the Iterators, arithmetic and other operations.
When multiplying two ChunkArray'
s with different chunk sizes they cannot utilize SIMD for instance.
However, when chunk size don’t match, Iterators will be used to do the operation (instead of arrows upstream implementation, which may utilize SIMD) and
the result will be a single chunked array.
The key takeaway is that by applying operations on a ChunkArray
of multiple chunks, the results will converge to
a ChunkArray
of a single chunk! It is recommended to leave them as is. If you want to have predictable performance
(no unexpected re-allocation of memory), it is advised to call the rechunk after
multiple append operations.
Implementations
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
[src]pub fn downcast_iter(
&self
) -> impl Iterator<Item = &PrimitiveArray<T>> + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = &PrimitiveArray<T>> + DoubleEndedIterator
pub fn downcast_chunks(&self) -> Chunks<'_, PrimitiveArray<T>>
[src]
impl ChunkedArray<BooleanType>
[src]
impl ChunkedArray<BooleanType>
[src]pub fn downcast_iter(
&self
) -> impl Iterator<Item = &BooleanArray> + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = &BooleanArray> + DoubleEndedIterator
pub fn downcast_chunks(&self) -> Chunks<'_, BooleanArray>
[src]
impl ChunkedArray<Utf8Type>
[src]
impl ChunkedArray<Utf8Type>
[src]pub fn downcast_iter(
&self
) -> impl Iterator<Item = &LargeStringArray> + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = &LargeStringArray> + DoubleEndedIterator
pub fn downcast_chunks(&self) -> Chunks<'_, LargeStringArray>
[src]
impl ChunkedArray<ListType>
[src]
impl ChunkedArray<ListType>
[src]pub fn downcast_iter(
&self
) -> impl Iterator<Item = &LargeListArray> + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = &LargeListArray> + DoubleEndedIterator
pub fn downcast_chunks(&self) -> Chunks<'_, LargeListArray>
[src]
impl<'a, T> ChunkedArray<ObjectType<T>> where
T: PolarsObject,
[src]
impl<'a, T> ChunkedArray<ObjectType<T>> where
T: PolarsObject,
[src]pub fn downcast_iter(
&self
) -> impl Iterator<Item = &ObjectArray<T>> + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = &ObjectArray<T>> + DoubleEndedIterator
pub fn downcast_chunks(&self) -> Chunks<'_, ObjectArray<T>>
[src]
impl ChunkedArray<BooleanType>
[src]
impl ChunkedArray<BooleanType>
[src]pub fn arg_true(&self) -> UInt32Chunked
[src]
impl ChunkedArray<BooleanType>
[src]
impl ChunkedArray<BooleanType>
[src]impl ChunkedArray<BooleanType>
[src]
impl ChunkedArray<BooleanType>
[src]impl ChunkedArray<BooleanType>
[src]
impl ChunkedArray<BooleanType>
[src]pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = bool> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = bool> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
impl ChunkedArray<Utf8Type>
[src]
impl ChunkedArray<Utf8Type>
[src]pub fn into_no_null_iter<'a>(
&'a self
) -> impl Iterator<Item = &'a str> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
[src]
&'a self
) -> impl Iterator<Item = &'a str> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
impl ChunkedArray<ListType>
[src]
impl ChunkedArray<ListType>
[src]pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = Series> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = Series> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
impl<T: PolarsObject> ChunkedArray<ObjectType<T>>
[src]
impl<T: PolarsObject> ChunkedArray<ObjectType<T>>
[src]pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = &T> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = &T> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
impl ChunkedArray<CategoricalType>
[src]
impl ChunkedArray<CategoricalType>
[src]pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = u32> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
[src]
&self
) -> impl Iterator<Item = u32> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
[src]pub fn to_ndarray(&self) -> Result<ArrayView1<'_, T::Native>>
[src]
This is supported on crate feature ndarray
only.
pub fn to_ndarray(&self) -> Result<ArrayView1<'_, T::Native>>
[src]ndarray
only.If data is aligned in a single chunk and has no Null values a zero copy view is returned
as an ndarray
impl ChunkedArray<ListType>
[src]
impl ChunkedArray<ListType>
[src]pub fn to_ndarray<N>(&self) -> Result<Array2<N::Native>> where
N: PolarsNumericType,
[src]
This is supported on crate feature ndarray
only.
pub fn to_ndarray<N>(&self) -> Result<Array2<N::Native>> where
N: PolarsNumericType,
[src]ndarray
only.If all nested Series
have the same length, a 2 dimensional ndarray::Array
is returned.
impl<T> ChunkedArray<ObjectType<T>> where
T: PolarsObject,
[src]
impl<T> ChunkedArray<ObjectType<T>> where
T: PolarsObject,
[src]pub fn new_from_vec(name: &str, v: Vec<T>) -> Self
[src]
object
only.impl<T> ChunkedArray<ObjectType<T>> where
T: PolarsObject,
[src]
impl<T> ChunkedArray<ObjectType<T>> where
T: PolarsObject,
[src]pub unsafe fn get_as_any(&self, index: usize) -> &dyn Any
[src]
This is supported on crate feature object
only.
pub unsafe fn get_as_any(&self, index: usize) -> &dyn Any
[src]object
only.Safety
No bounds checks
impl<T> ChunkedArray<T> where
ChunkedArray<T>: ChunkTake,
[src]
impl<T> ChunkedArray<T> where
ChunkedArray<T>: ChunkTake,
[src]pub fn sample_n(&self, n: usize, with_replacement: bool) -> Result<Self>
[src]
This is supported on crate feature random
only.
pub fn sample_n(&self, n: usize, with_replacement: bool) -> Result<Self>
[src]random
only.Sample n datapoints from this ChunkedArray.
pub fn sample_frac(&self, frac: f64, with_replacement: bool) -> Result<Self>
[src]
This is supported on crate feature random
only.
pub fn sample_frac(&self, frac: f64, with_replacement: bool) -> Result<Self>
[src]random
only.Sample a fraction between 0.0-1.0 of this ChunkedArray.
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Float + NumCast,
[src]
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Float + NumCast,
[src]pub fn rand_normal(
name: &str,
length: usize,
mean: f64,
std_dev: f64
) -> Result<Self>
[src]
This is supported on crate feature random
only.
pub fn rand_normal(
name: &str,
length: usize,
mean: f64,
std_dev: f64
) -> Result<Self>
[src]random
only.Create ChunkedArray
with samples from a Normal distribution.
pub fn rand_standard_normal(name: &str, length: usize) -> Self
[src]
This is supported on crate feature random
only.
pub fn rand_standard_normal(name: &str, length: usize) -> Self
[src]random
only.Create ChunkedArray
with samples from a Standard Normal distribution.
impl ChunkedArray<BooleanType>
[src]
impl ChunkedArray<BooleanType>
[src]impl ChunkedArray<Utf8Type>
[src]
impl ChunkedArray<Utf8Type>
[src]pub fn str_lengths(&self) -> UInt32Chunked
[src]
This is supported on crate feature strings
only.
pub fn str_lengths(&self) -> UInt32Chunked
[src]strings
only.Get the length of the string values.
pub fn contains(&self, pat: &str) -> Result<BooleanChunked>
[src]
This is supported on crate feature strings
only.
pub fn contains(&self, pat: &str) -> Result<BooleanChunked>
[src]strings
only.Check if strings contain a regex pattern
pub fn replace(&self, pat: &str, val: &str) -> Result<Utf8Chunked>
[src]
This is supported on crate feature strings
only.
pub fn replace(&self, pat: &str, val: &str) -> Result<Utf8Chunked>
[src]strings
only.Replace the leftmost (sub)string by a regex pattern
pub fn replace_all(&self, pat: &str, val: &str) -> Result<Utf8Chunked>
[src]
This is supported on crate feature strings
only.
pub fn replace_all(&self, pat: &str, val: &str) -> Result<Utf8Chunked>
[src]strings
only.Replace all (sub)strings by a regex pattern
pub fn to_lowercase(&self) -> Utf8Chunked
[src]
This is supported on crate feature strings
only.
pub fn to_lowercase(&self) -> Utf8Chunked
[src]strings
only.Modify the strings to their lowercase equivalent
pub fn to_uppercase(&self) -> Utf8Chunked
[src]
This is supported on crate feature strings
only.
pub fn to_uppercase(&self) -> Utf8Chunked
[src]strings
only.Modify the strings to their uppercase equivalent
pub fn concat(&self, other: &Utf8Chunked) -> Self
[src]
This is supported on crate feature strings
only.
pub fn concat(&self, other: &Utf8Chunked) -> Self
[src]strings
only.Concat with the values from a second Utf8Chunked
pub fn str_slice(&self, start: i64, length: Option<u64>) -> Result<Self>
[src]
This is supported on crate feature strings
only.
pub fn str_slice(&self, start: i64, length: Option<u64>) -> Result<Self>
[src]strings
only.Slice the string values
Determines a substring starting from start
and with optional length length
of each of the elements in array
.
start
can be negative, in which case the start counts from the end of the string.
impl ChunkedArray<Utf8Type>
[src]
impl ChunkedArray<Utf8Type>
[src]impl ChunkedArray<Date64Type>
[src]
impl ChunkedArray<Date64Type>
[src]pub fn year(&self) -> Int32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn year(&self) -> Int32Chunked
[src]temporal
only.Extract month from underlying NaiveDateTime representation. Returns the year number in the calendar date.
pub fn month(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn month(&self) -> UInt32Chunked
[src]temporal
only.Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.
The return value ranges from 1 to 12.
pub fn weekday(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn weekday(&self) -> UInt32Chunked
[src]temporal
only.Extract weekday from underlying NaiveDateTime representation. Returns the weekday number where monday = 0 and sunday = 6
pub fn week(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn week(&self) -> UInt32Chunked
[src]temporal
only.Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
pub fn day(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn day(&self) -> UInt32Chunked
[src]temporal
only.Extract day from underlying NaiveDateTime representation. Returns the day of month starting from 1.
The return value ranges from 1 to 31. (The last day of month differs by months.)
pub fn hour(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn hour(&self) -> UInt32Chunked
[src]temporal
only.Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.
pub fn minute(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn minute(&self) -> UInt32Chunked
[src]temporal
only.Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.
pub fn second(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn second(&self) -> UInt32Chunked
[src]temporal
only.Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.
pub fn nanosecond(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn nanosecond(&self) -> UInt32Chunked
[src]temporal
only.Extract second from underlying NaiveDateTime representation. Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second.
pub fn ordinal(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn ordinal(&self) -> UInt32Chunked
[src]temporal
only.Returns the day of year starting from 1.
The return value ranges from 1 to 366. (The last day of year differs by years.)
pub fn strftime(&self, fmt: &str) -> Utf8Chunked
[src]
This is supported on crate feature temporal
only.
pub fn strftime(&self, fmt: &str) -> Utf8Chunked
[src]temporal
only.Format Date64 with a fmt
rule. See chrono strftime/strptime.
impl ChunkedArray<Date32Type>
[src]
impl ChunkedArray<Date32Type>
[src]pub fn year(&self) -> Int32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn year(&self) -> Int32Chunked
[src]temporal
only.Extract month from underlying NaiveDate representation. Returns the year number in the calendar date.
pub fn month(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn month(&self) -> UInt32Chunked
[src]temporal
only.Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.
The return value ranges from 1 to 12.
pub fn weekday(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn weekday(&self) -> UInt32Chunked
[src]temporal
only.Extract weekday from underlying NaiveDate representation. Returns the weekday number where monday = 0 and sunday = 6
pub fn week(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn week(&self) -> UInt32Chunked
[src]temporal
only.Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
pub fn day(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn day(&self) -> UInt32Chunked
[src]temporal
only.Extract day from underlying NaiveDate representation. Returns the day of month starting from 1.
The return value ranges from 1 to 31. (The last day of month differs by months.)
pub fn ordinal(&self) -> UInt32Chunked
[src]
This is supported on crate feature temporal
only.
pub fn ordinal(&self) -> UInt32Chunked
[src]temporal
only.Returns the day of year starting from 1.
The return value ranges from 1 to 366. (The last day of year differs by years.)
pub fn strftime(&self, fmt: &str) -> Utf8Chunked
[src]
This is supported on crate feature temporal
only.
pub fn strftime(&self, fmt: &str) -> Utf8Chunked
[src]temporal
only.Format Date32 with a fmt
rule. See chrono strftime/strptime.
impl<T> ChunkedArray<T>
[src]
impl<T> ChunkedArray<T>
[src]pub fn array_data(&self) -> Vec<&ArrayData>
[src]
pub fn array_data(&self) -> Vec<&ArrayData>
[src]Get Arrow ArrayData
pub fn get_categorical_map(&self) -> Option<&Arc<RevMapping>>
[src]
pub fn get_categorical_map(&self) -> Option<&Arc<RevMapping>>
[src]Get a reference to the mapping of categorical types to the string values.
pub fn first_non_null(&self) -> Option<usize>
[src]
pub fn first_non_null(&self) -> Option<usize>
[src]Get the index of the first non null value in this ChunkedArray.
pub fn null_bits(&self) -> impl Iterator<Item = (usize, Option<Buffer>)> + '_
[src]
pub fn null_bits(&self) -> impl Iterator<Item = (usize, Option<Buffer>)> + '_
[src]Get the null count and the buffer of bits representing null values
pub fn unpack_series_matching_type(
&self,
series: &Series
) -> Result<&ChunkedArray<T>>
[src]
pub fn unpack_series_matching_type(
&self,
series: &Series
) -> Result<&ChunkedArray<T>>
[src]Series to ChunkedArray
pub fn chunk_id(&self) -> ChunkIdIter<'_>
[src]
pub fn chunk_id(&self) -> ChunkIdIter<'_>
[src]Unique id representing the number of chunks
pub fn is_optimal_aligned(&self) -> bool
[src]
pub fn is_optimal_aligned(&self) -> bool
[src]Returns true if contains a single chunk and has no null values
pub fn null_count(&self) -> usize
[src]
pub fn null_count(&self) -> usize
[src]Count the null values.
pub fn append_array(&mut self, other: ArrayRef) -> Result<()>
[src]
pub fn append_array(&mut self, other: ArrayRef) -> Result<()>
[src]Append arrow array in place.
let mut array = Int32Chunked::new_from_slice("array", &[1, 2]); let array_2 = Int32Chunked::new_from_slice("2nd", &[3]); array.append(&array_2); assert_eq!(Vec::from(&array), [Some(1), Some(2), Some(3)])
pub fn slice(&self, offset: i64, length: usize) -> Self
[src]
pub fn slice(&self, offset: i64, length: usize) -> Self
[src]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
pub fn is_null(&self) -> BooleanChunked
[src]
pub fn is_null(&self) -> BooleanChunked
[src]Get a mask of the null values.
pub fn is_not_null(&self) -> BooleanChunked
[src]
pub fn is_not_null(&self) -> BooleanChunked
[src]Get a mask of the null values.
impl<T> ChunkedArray<T> where
T: PolarsDataType,
[src]
impl<T> ChunkedArray<T> where
T: PolarsDataType,
[src]pub fn new_from_chunks(name: &str, chunks: Vec<ArrayRef>) -> Self
[src]
pub fn new_from_chunks(name: &str, chunks: Vec<ArrayRef>) -> Self
[src]Create a new ChunkedArray from existing chunks.
impl<T> ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]
impl<T> ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]pub fn new_from_aligned_vec(name: &str, v: AlignedVec<T::Native>) -> Self
[src]
pub fn new_from_aligned_vec(name: &str, v: AlignedVec<T::Native>) -> Self
[src]Create a new ChunkedArray by taking ownership of the AlignedVec. This operation is zero copy.
pub fn new_from_owned_with_null_bitmap(
name: &str,
values: AlignedVec<T::Native>,
buffer: Option<Buffer>
) -> Self
[src]
pub fn new_from_owned_with_null_bitmap(
name: &str,
values: AlignedVec<T::Native>,
buffer: Option<Buffer>
) -> Self
[src]Nullify values in slice with an existing null bitmap
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
[src]pub fn data_views(
&self
) -> impl Iterator<Item = &[T::Native]> + DoubleEndedIterator
[src]
pub fn data_views(
&self
) -> impl Iterator<Item = &[T::Native]> + DoubleEndedIterator
[src]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
[src]
&self
) -> impl Iterator<Item = T::Native> + '_ + Send + Sync + ExactSizeIterator + DoubleEndedIterator
pub fn map<B, F>(&self, f: F) -> Result<Map<Copied<Iter<'_, T::Native>>, F>> where
F: Fn(T::Native) -> B,
[src]
pub fn map<B, F>(&self, f: F) -> Result<Map<Copied<Iter<'_, T::Native>>, F>> where
F: Fn(T::Native) -> B,
[src]If cont_slice is successful a closure is mapped over the elements.
Example
use polars_core::prelude::*; fn multiply(ca: &UInt32Chunked) -> Result<Series> { let mapped = ca.map(|v| v * 2)?; Ok(mapped.collect()) }
pub fn map_null_checks<'a, B, F>(
&'a self,
f: F
) -> Map<Box<dyn PolarsIterator<Item = Option<T::Native>> + 'a>, F> where
F: Fn(Option<T::Native>) -> B,
[src]
pub fn map_null_checks<'a, B, F>(
&'a self,
f: F
) -> Map<Box<dyn PolarsIterator<Item = Option<T::Native>> + 'a>, F> where
F: Fn(Option<T::Native>) -> B,
[src]If cont_slice fails we can fallback on an iterator with null checks and map a closure over the elements.
Example
use polars_core::prelude::*; use itertools::Itertools; fn multiply(ca: &UInt32Chunked) -> Series { let mapped_result = ca.map(|v| v * 2); if let Ok(mapped) = mapped_result { mapped.collect() } else { ca .map_null_checks(|opt_v| opt_v.map(|v |v * 2)).collect() } }
pub fn fold<F, B>(&self, init: B, f: F) -> Result<B> where
F: Fn(B, T::Native) -> B,
[src]
pub fn fold<F, B>(&self, init: B, f: F) -> Result<B> where
F: Fn(B, T::Native) -> B,
[src]If cont_slice is successful a closure can be applied as aggregation
Example
use polars_core::prelude::*; fn compute_sum(ca: &UInt32Chunked) -> Result<u32> { ca.fold(0, |acc, value| acc + value) }
pub fn fold_null_checks<F, B>(&self, init: B, f: F) -> B where
F: Fn(B, Option<T::Native>) -> B,
[src]
pub fn fold_null_checks<F, B>(&self, init: B, f: F) -> B where
F: Fn(B, Option<T::Native>) -> B,
[src]If cont_slice fails we can fallback on an iterator with null checks and a closure for aggregation
Example
use polars_core::prelude::*; fn compute_sum(ca: &UInt32Chunked) -> u32 { match ca.fold(0, |acc, value| acc + value) { // faster sum without null checks was successful Ok(sum) => sum, // Null values or multiple chunks in ChunkedArray, we need to do more bounds checking Err(_) => ca.fold_null_checks(0, |acc, opt_value| { match opt_value { Some(v) => acc + v, None => acc } }) } }
impl ChunkedArray<ListType>
[src]
impl ChunkedArray<ListType>
[src]pub fn inner_dtype(&self) -> DataType
[src]
pub fn inner_dtype(&self) -> DataType
[src]Get the inner data type of the list.
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Num + NumCast + Sub<Output = T::Native> + Div<Output = T::Native>,
ChunkedArray<T>: IntoSeries,
[src]
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Num + NumCast + Sub<Output = T::Native> + Div<Output = T::Native>,
ChunkedArray<T>: IntoSeries,
[src]We cannot override the left hand side behaviour. So we create a trait LhsNumOps. This allows for 1.add(&Series)
Trait Implementations
impl<T> Add<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]
impl<T> Add<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]impl Add<&'_ ChunkedArray<Utf8Type>> for &Utf8Chunked
[src]
impl Add<&'_ ChunkedArray<Utf8Type>> for &Utf8Chunked
[src]impl<T> Add<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]
impl<T> Add<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]impl Add<ChunkedArray<Utf8Type>> for Utf8Chunked
[src]
impl Add<ChunkedArray<Utf8Type>> for Utf8Chunked
[src]impl<T, N> Add<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Add<Output = T::Native>,
[src]
impl<T, N> Add<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Add<Output = T::Native>,
[src]impl<T, N> Add<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Add<Output = T::Native>,
[src]
impl<T, N> Add<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Add<Output = T::Native>,
[src]impl<T> ArgAgg for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ArgAgg for ChunkedArray<T> where
T: PolarsNumericType,
[src]impl<T> AsRef<ChunkedArray<T>> for ChunkedArray<T>
[src]
impl<T> AsRef<ChunkedArray<T>> for ChunkedArray<T>
[src]fn as_ref(&self) -> &ChunkedArray<T>
[src]
fn as_ref(&self) -> &ChunkedArray<T>
[src]Performs the conversion.
impl<'a, T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + 'a where
T: 'static + PolarsDataType,
[src]
impl<'a, T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + 'a where
T: 'static + PolarsDataType,
[src]fn as_ref(&self) -> &ChunkedArray<T>
[src]
fn as_ref(&self) -> &ChunkedArray<T>
[src]Performs the conversion.
impl BitAnd<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
[src]
impl BitAnd<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
[src]impl BitAnd<ChunkedArray<BooleanType>> for BooleanChunked
[src]
impl BitAnd<ChunkedArray<BooleanType>> for BooleanChunked
[src]impl BitOr<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
[src]
impl BitOr<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
[src]impl BitOr<ChunkedArray<BooleanType>> for BooleanChunked
[src]
impl BitOr<ChunkedArray<BooleanType>> for BooleanChunked
[src]impl<T> ChunkAgg<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: PartialOrd + Num + NumCast + Zero,
[src]
impl<T> ChunkAgg<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: PartialOrd + Num + NumCast + Zero,
[src]fn sum(&self) -> Option<T::Native>
[src]
fn sum(&self) -> Option<T::Native>
[src]Aggregate the sum of the ChunkedArray.
Returns None
if the array is empty or only contains null values. Read more
fn min(&self) -> Option<T::Native>
[src]
fn max(&self) -> Option<T::Native>
[src]
fn max(&self) -> Option<T::Native>
[src]Returns the maximum value in the array, according to the natural order.
Returns None
if the array is empty or only contains null values. Read more
fn mean(&self) -> Option<f64>
[src]
fn mean(&self) -> Option<f64>
[src]Returns the mean value in the array.
Returns None
if the array is empty or only contains null values. Read more
impl<T> ChunkAggSeries for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: PartialOrd + Num + NumCast,
ChunkedArray<T>: IntoSeries,
[src]
impl<T> ChunkAggSeries for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: PartialOrd + Num + NumCast,
ChunkedArray<T>: IntoSeries,
[src]fn sum_as_series(&self) -> Series
[src]
fn sum_as_series(&self) -> Series
[src]Get the sum of the ChunkedArray as a new Series of length 1.
fn max_as_series(&self) -> Series
[src]
fn max_as_series(&self) -> Series
[src]Get the max of the ChunkedArray as a new Series of length 1.
fn min_as_series(&self) -> Series
[src]
fn min_as_series(&self) -> Series
[src]Get the min of the ChunkedArray as a new Series of length 1.
fn mean_as_series(&self) -> Series
[src]
fn mean_as_series(&self) -> Series
[src]Get the mean of the ChunkedArray as a new Series of length 1.
fn median_as_series(&self) -> Series
[src]
fn median_as_series(&self) -> Series
[src]Get the median of the ChunkedArray as a new Series of length 1.
fn quantile_as_series(&self, quantile: f64) -> Result<Series>
[src]
fn quantile_as_series(&self, quantile: f64) -> Result<Series>
[src]Get the quantile of the ChunkedArray as a new Series of length 1.
impl<T> ChunkAnyValue for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkAnyValue for ChunkedArray<T> where
T: PolarsNumericType,
[src]unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
[src]
unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
[src]Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
fn get_any_value(&self, index: usize) -> AnyValue<'_>
[src]
fn get_any_value(&self, index: usize) -> AnyValue<'_>
[src]Get a single value. Beware this is slow.
impl<'a, T> ChunkApply<'a, <T as ArrowPrimitiveType>::Native, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<'a, T> ChunkApply<'a, <T as ArrowPrimitiveType>::Native, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
[src]fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(T::Native) -> S::Native + Copy,
S: PolarsNumericType,
[src]
fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(T::Native) -> S::Native + Copy,
S: PolarsNumericType,
[src]Apply a closure elementwise and cast to a Numeric ChunkedArray. This is fastest when the null check branching is more expensive than the closure application. Read more
fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<T::Native>) -> S::Native + Copy,
S: PolarsNumericType,
[src]
fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<T::Native>) -> S::Native + Copy,
S: PolarsNumericType,
[src]Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
fn apply<F>(&'a self, f: F) -> Self where
F: Fn(T::Native) -> T::Native + Copy,
[src]
fn apply<F>(&'a self, f: F) -> Self where
F: Fn(T::Native) -> T::Native + Copy,
[src]Apply a closure elementwise. This is fastest when the null check branching is more expensive than the closure application. Often it is. Read more
impl<T> ChunkApplyKernel<PrimitiveArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkApplyKernel<PrimitiveArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
[src]fn apply_kernel<F>(&self, f: F) -> Self where
F: Fn(&PrimitiveArray<T>) -> ArrayRef,
[src]
fn apply_kernel<F>(&self, f: F) -> Self where
F: Fn(&PrimitiveArray<T>) -> ArrayRef,
[src]Apply kernel and return result as a new ChunkedArray.
fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&PrimitiveArray<T>) -> ArrayRef,
S: PolarsDataType,
[src]
fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&PrimitiveArray<T>) -> ArrayRef,
S: PolarsDataType,
[src]Apply a kernel that outputs an array of different type.
impl<T> ChunkCast for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
[src]
impl<T> ChunkCast for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
[src]fn cast<N>(&self) -> Result<ChunkedArray<N>> where
N: PolarsDataType,
[src]
fn cast<N>(&self) -> Result<ChunkedArray<N>> where
N: PolarsDataType,
[src]Cast ChunkedArray<T>
to ChunkedArray<N>
fn cast_with_dtype(&self, data_type: &DataType) -> Result<Series>
[src]
impl ChunkCompare<&'_ ChunkedArray<BooleanType>> for BooleanChunked
[src]
impl ChunkCompare<&'_ ChunkedArray<BooleanType>> for BooleanChunked
[src]fn eq_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]
fn eq_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]Check for equality and regard missing values as equal.
fn eq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]
fn eq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]Check for equality.
fn neq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]
fn neq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]Check for inequality.
fn gt(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]
fn gt(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]Greater than comparison.
fn gt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]
fn gt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]Greater than or equal comparison.
fn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]
fn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]Less than comparison.
fn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]
fn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
[src]Less than or equal comparison
impl ChunkCompare<&'_ ChunkedArray<ListType>> for ListChunked
[src]
impl ChunkCompare<&'_ ChunkedArray<ListType>> for ListChunked
[src]fn eq_missing(&self, rhs: &ListChunked) -> BooleanChunked
[src]
fn eq_missing(&self, rhs: &ListChunked) -> BooleanChunked
[src]Check for equality and regard missing values as equal.
fn eq(&self, rhs: &ListChunked) -> BooleanChunked
[src]
fn eq(&self, rhs: &ListChunked) -> BooleanChunked
[src]Check for equality.
fn neq(&self, rhs: &ListChunked) -> BooleanChunked
[src]
fn neq(&self, rhs: &ListChunked) -> BooleanChunked
[src]Check for inequality.
fn gt(&self, _rhs: &ListChunked) -> BooleanChunked
[src]
fn gt(&self, _rhs: &ListChunked) -> BooleanChunked
[src]Greater than comparison.
fn gt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
[src]
fn gt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
[src]Greater than or equal comparison.
fn lt(&self, _rhs: &ListChunked) -> BooleanChunked
[src]
fn lt(&self, _rhs: &ListChunked) -> BooleanChunked
[src]Less than comparison.
fn lt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
[src]
fn lt_eq(&self, _rhs: &ListChunked) -> BooleanChunked
[src]Less than or equal comparison
impl<T> ChunkCompare<&'_ ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumComp,
[src]
impl<T> ChunkCompare<&'_ ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumComp,
[src]fn eq_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]
fn eq_missing(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]Check for equality and regard missing values as equal.
fn eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]
fn eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]Check for equality.
fn neq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]
fn neq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]Check for inequality.
fn gt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]
fn gt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]Greater than comparison.
fn gt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]
fn gt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]Greater than or equal comparison.
fn lt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]
fn lt(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]Less than comparison.
fn lt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]
fn lt_eq(&self, rhs: &ChunkedArray<T>) -> BooleanChunked
[src]Less than or equal comparison
impl ChunkCompare<&'_ ChunkedArray<Utf8Type>> for Utf8Chunked
[src]
impl ChunkCompare<&'_ ChunkedArray<Utf8Type>> for Utf8Chunked
[src]fn eq_missing(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]
fn eq_missing(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]Check for equality and regard missing values as equal.
fn eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]
fn eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]Check for equality.
fn neq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]
fn neq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]Check for inequality.
fn gt(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]
fn gt(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]Greater than comparison.
fn gt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]
fn gt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]Greater than or equal comparison.
fn lt(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]
fn lt(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]Less than comparison.
fn lt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]
fn lt_eq(&self, rhs: &Utf8Chunked) -> BooleanChunked
[src]Less than or equal comparison
impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
Rhs: NumComp + ToPrimitive,
[src]
impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
Rhs: NumComp + ToPrimitive,
[src]fn eq_missing(&self, rhs: Rhs) -> BooleanChunked
[src]
fn eq_missing(&self, rhs: Rhs) -> BooleanChunked
[src]Check for equality and regard missing values as equal.
fn eq(&self, rhs: Rhs) -> BooleanChunked
[src]
fn eq(&self, rhs: Rhs) -> BooleanChunked
[src]Check for equality.
fn neq(&self, rhs: Rhs) -> BooleanChunked
[src]
fn neq(&self, rhs: Rhs) -> BooleanChunked
[src]Check for inequality.
fn gt(&self, rhs: Rhs) -> BooleanChunked
[src]
fn gt(&self, rhs: Rhs) -> BooleanChunked
[src]Greater than comparison.
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
[src]
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
[src]Greater than or equal comparison.
fn lt(&self, rhs: Rhs) -> BooleanChunked
[src]
fn lt(&self, rhs: Rhs) -> BooleanChunked
[src]Less than comparison.
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
[src]
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
[src]Less than or equal comparison
impl<T> ChunkCumAgg<T> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Bounded + PartialOrd + AddAssign + Add<Output = T::Native>,
ChunkedArray<T>: FromIterator<Option<T::Native>>,
[src]
impl<T> ChunkCumAgg<T> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Bounded + PartialOrd + AddAssign + Add<Output = T::Native>,
ChunkedArray<T>: FromIterator<Option<T::Native>>,
[src]fn cum_max(&self, reverse: bool) -> ChunkedArray<T>
[src]
fn cum_max(&self, reverse: bool) -> ChunkedArray<T>
[src]Get an array with the cumulative max computed at every element
fn cum_min(&self, reverse: bool) -> ChunkedArray<T>
[src]
fn cum_min(&self, reverse: bool) -> ChunkedArray<T>
[src]Get an array with the cumulative min computed at every element
fn cum_sum(&self, reverse: bool) -> ChunkedArray<T>
[src]
fn cum_sum(&self, reverse: bool) -> ChunkedArray<T>
[src]Get an array with the cumulative sum computed at every element
impl<T> ChunkExpandAtIndex<T> for ChunkedArray<T> where
ChunkedArray<T>: ChunkFull<T::Native> + TakeRandom<Item = T::Native>,
T: PolarsPrimitiveType,
[src]
impl<T> ChunkExpandAtIndex<T> for ChunkedArray<T> where
ChunkedArray<T>: ChunkFull<T::Native> + TakeRandom<Item = T::Native>,
T: PolarsPrimitiveType,
[src]fn expand_at_index(&self, index: usize, length: usize) -> ChunkedArray<T>
[src]
fn expand_at_index(&self, index: usize, length: usize) -> ChunkedArray<T>
[src]Create a new ChunkedArray filled with values at that index.
impl<T> ChunkFillNone for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + PartialOrd + Div<Output = T::Native> + Num + NumCast + Zero + One + Bounded,
[src]
impl<T> ChunkFillNone for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + PartialOrd + Div<Output = T::Native> + Num + NumCast + Zero + One + Bounded,
[src]fn fill_none(&self, strategy: FillNoneStrategy) -> Result<Self>
[src]
fn fill_none(&self, strategy: FillNoneStrategy) -> Result<Self>
[src]Replace None values with one of the following strategies: Read more
impl<T> ChunkFillNoneValue<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + PartialOrd + Div<Output = T::Native> + Num + NumCast,
[src]
impl<T> ChunkFillNoneValue<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + PartialOrd + Div<Output = T::Native> + Num + NumCast,
[src]fn fill_none_with_value(&self, value: T::Native) -> Result<Self>
[src]
fn fill_none_with_value(&self, value: T::Native) -> Result<Self>
[src]Replace None values with a give value T
.
impl<T> ChunkFilter<T> for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkFilter<T> for ChunkedArray<T> where
T: PolarsNumericType,
[src]fn filter(&self, filter: &BooleanChunked) -> Result<ChunkedArray<T>>
[src]
fn filter(&self, filter: &BooleanChunked) -> Result<ChunkedArray<T>>
[src]Filter values in the ChunkedArray with a boolean mask. Read more
impl<T> ChunkFull<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]
impl<T> ChunkFull<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]impl<T> ChunkFullNull for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]
impl<T> ChunkFullNull for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]impl<T> ChunkIntegerDecode for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: IntegerDecode,
[src]
impl<T> ChunkIntegerDecode for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: IntegerDecode,
[src]fn integer_decode(&self) -> (UInt64Chunked, Int16Chunked, Int8Chunked)
[src]
impl<T> ChunkOps for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkOps for ChunkedArray<T> where
T: PolarsNumericType,
[src]impl<T> ChunkPeaks for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumComp + Zero,
[src]
impl<T> ChunkPeaks for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumComp + Zero,
[src]fn peak_max(&self) -> BooleanChunked
[src]
fn peak_max(&self) -> BooleanChunked
[src]Get a boolean mask of the local maximum peaks.
fn peak_min(&self) -> BooleanChunked
[src]
fn peak_min(&self) -> BooleanChunked
[src]Get a boolean mask of the local minimum peaks.
impl<T> ChunkReverse<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkOps,
[src]
impl<T> ChunkReverse<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkOps,
[src]fn reverse(&self) -> ChunkedArray<T>
[src]
fn reverse(&self) -> ChunkedArray<T>
[src]Return a reversed version of this array.
impl<'a, T> ChunkSet<'a, <T as ArrowPrimitiveType>::Native, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<'a, T> ChunkSet<'a, <T as ArrowPrimitiveType>::Native, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
[src]fn set_at_idx<I: IntoIterator<Item = usize>>(
&'a self,
idx: I,
value: Option<T::Native>
) -> Result<Self>
[src]
fn set_at_idx<I: IntoIterator<Item = usize>>(
&'a self,
idx: I,
value: Option<T::Native>
) -> Result<Self>
[src]Set the values at indexes idx
to some optional value Option<T>
. Read more
fn set_at_idx_with<I: IntoIterator<Item = usize>, F>(
&'a self,
idx: I,
f: F
) -> Result<Self> where
F: Fn(Option<T::Native>) -> Option<T::Native>,
[src]
fn set_at_idx_with<I: IntoIterator<Item = usize>, F>(
&'a self,
idx: I,
f: F
) -> Result<Self> where
F: Fn(Option<T::Native>) -> Option<T::Native>,
[src]Set the values at indexes idx
by applying a closure to these values. Read more
impl<T> ChunkShift<T> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Copy,
[src]
impl<T> ChunkShift<T> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Copy,
[src]fn shift(&self, periods: i64) -> ChunkedArray<T>
[src]
impl<T> ChunkShiftFill<T, Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Copy,
[src]
impl<T> ChunkShiftFill<T, Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Copy,
[src]fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<T::Native>
) -> ChunkedArray<T>
[src]
fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<T::Native>
) -> ChunkedArray<T>
[src]Shift the values by a given period and fill the parts that will be empty due to this operation
with fill_value
. Read more
impl<T> ChunkSort<T> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: PartialOrd,
[src]
impl<T> ChunkSort<T> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: PartialOrd,
[src]fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<UInt32Chunked>
[src]
fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<UInt32Chunked>
[src]Panics
This function is very opinionated.
We assume that all numeric Series
are of the same type, if not it will panic
fn sort(&self, reverse: bool) -> ChunkedArray<T>
[src]
fn sort(&self, reverse: bool) -> ChunkedArray<T>
[src]Returned a sorted ChunkedArray
.
fn sort_in_place(&mut self, reverse: bool)
[src]
fn sort_in_place(&mut self, reverse: bool)
[src]Sort this array in place.
fn argsort(&self, reverse: bool) -> UInt32Chunked
[src]
fn argsort(&self, reverse: bool) -> UInt32Chunked
[src]Retrieve the indexes needed to sort this array.
impl<T> ChunkTake for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkTake for ChunkedArray<T> where
T: PolarsNumericType,
[src]impl<T> ChunkTakeEvery<T> for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkTakeEvery<T> for ChunkedArray<T> where
T: PolarsNumericType,
[src]fn take_every(&self, n: usize) -> ChunkedArray<T>
[src]
fn take_every(&self, n: usize) -> ChunkedArray<T>
[src]Traverse and collect every nth element in a new array.
impl<T> ChunkUnique<T> for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: Hash + Eq + NumCast,
ChunkedArray<T>: ChunkOps + IntoSeries,
[src]
impl<T> ChunkUnique<T> for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: Hash + Eq + NumCast,
ChunkedArray<T>: ChunkOps + IntoSeries,
[src]fn arg_unique(&self) -> Result<UInt32Chunked>
[src]
fn arg_unique(&self) -> Result<UInt32Chunked>
[src]Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
fn is_unique(&self) -> Result<BooleanChunked>
[src]
fn is_unique(&self) -> Result<BooleanChunked>
[src]Get a mask of all the unique values.
fn is_duplicated(&self) -> Result<BooleanChunked>
[src]
fn is_duplicated(&self) -> Result<BooleanChunked>
[src]Get a mask of all the duplicated values.
fn value_counts(&self) -> Result<DataFrame>
[src]
fn value_counts(&self) -> Result<DataFrame>
[src]Count the unique values.
impl<T> ChunkVar<f64> for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: PartialOrd + Num + NumCast,
[src]
impl<T> ChunkVar<f64> for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: PartialOrd + Num + NumCast,
[src]impl<T> ChunkWindow for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + Bounded + NumCast + PartialOrd + One + Copy,
[src]
impl<T> ChunkWindow for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + Bounded + NumCast + PartialOrd + One + Copy,
[src]fn rolling_sum(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]
fn rolling_sum(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]apply a rolling sum (moving sum) over the values in this array.
a window of length window_size
will traverse the array. the values that fill this window
will (optionally) be multiplied with the weights given by the weight
vector. the resulting
values will be aggregated to their sum. Read more
fn rolling_mean(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]
fn rolling_mean(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]Apply a rolling mean (moving mean) over the values in this array.
A window of length window_size
will traverse the array. The values that fill this window
will (optionally) be multiplied with the weights given by the weight
vector. The resulting
values will be aggregated to their mean. Read more
fn rolling_min(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]
fn rolling_min(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]Apply a rolling min (moving min) over the values in this array.
A window of length window_size
will traverse the array. The values that fill this window
will (optionally) be multiplied with the weights given by the weight
vector. The resulting
values will be aggregated to their min. Read more
fn rolling_max(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]
fn rolling_max(
&self,
window_size: u32,
weight: Option<&[f64]>,
ignore_null: bool,
min_periods: u32
) -> Result<Self>
[src]Apply a rolling max (moving max) over the values in this array.
A window of length window_size
will traverse the array. The values that fill this window
will (optionally) be multiplied with the weights given by the weight
vector. The resulting
values will be aggregated to their max. Read more
impl<T> ChunkWindowCustom<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Zero + Bounded + NumCast + Div<Output = T::Native> + Mul<Output = T::Native> + PartialOrd + One + Copy,
[src]
impl<T> ChunkWindowCustom<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Zero + Bounded + NumCast + Div<Output = T::Native> + Mul<Output = T::Native> + PartialOrd + One + Copy,
[src]impl<T> ChunkZip<T> for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> ChunkZip<T> for ChunkedArray<T> where
T: PolarsNumericType,
[src]fn zip_with(
&self,
mask: &BooleanChunked,
other: &ChunkedArray<T>
) -> Result<ChunkedArray<T>>
[src]
fn zip_with(
&self,
mask: &BooleanChunked,
other: &ChunkedArray<T>
) -> Result<ChunkedArray<T>>
[src]Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
impl<T> Clone for ChunkedArray<T>
[src]
impl<T> Clone for ChunkedArray<T>
[src]impl<T> Debug for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> Debug for ChunkedArray<T> where
T: PolarsNumericType,
[src]impl Debug for ChunkedArray<BooleanType>
[src]
impl Debug for ChunkedArray<BooleanType>
[src]impl<T> Default for ChunkedArray<T>
[src]
impl<T> Default for ChunkedArray<T>
[src]impl<T> Div<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + One,
[src]
impl<T> Div<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + One,
[src]impl<T> Div<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + One,
[src]
impl<T> Div<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + One,
[src]impl<T, N> Div<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast + Div<Output = T::Native> + One + Zero + Sub<Output = T::Native>,
N: Num + ToPrimitive,
[src]
impl<T, N> Div<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast + Div<Output = T::Native> + One + Zero + Sub<Output = T::Native>,
N: Num + ToPrimitive,
[src]impl<T, N> Div<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast + Div<Output = T::Native> + One + Zero + Sub<Output = T::Native>,
N: Num + ToPrimitive,
[src]
impl<T, N> Div<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast + Div<Output = T::Native> + One + Zero + Sub<Output = T::Native>,
N: Num + ToPrimitive,
[src]impl<'a> From<&'a ChunkedArray<UInt32Type>> for TakeIdx<'a, Dummy<usize>, Dummy<Option<usize>>>
[src]
impl<'a> From<&'a ChunkedArray<UInt32Type>> for TakeIdx<'a, Dummy<usize>, Dummy<Option<usize>>>
[src]fn from(ca: &'a UInt32Chunked) -> Self
[src]
fn from(ca: &'a UInt32Chunked) -> Self
[src]Performs the conversion.
impl<T> From<ChunkedArray<T>> for Series where
T: PolarsDataType,
ChunkedArray<T>: IntoSeries,
[src]
impl<T> From<ChunkedArray<T>> for Series where
T: PolarsDataType,
ChunkedArray<T>: IntoSeries,
[src]fn from(ca: ChunkedArray<T>) -> Self
[src]
fn from(ca: ChunkedArray<T>) -> Self
[src]Performs the conversion.
impl From<ChunkedArray<UInt32Type>> for CategoricalChunked
[src]
impl From<ChunkedArray<UInt32Type>> for CategoricalChunked
[src]fn from(ca: UInt32Chunked) -> Self
[src]
fn from(ca: UInt32Chunked) -> Self
[src]Performs the conversion.
impl<T> FromIterator<(AlignedVec<<T as ArrowPrimitiveType>::Native>, Option<Buffer>)> for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> FromIterator<(AlignedVec<<T as ArrowPrimitiveType>::Native>, Option<Buffer>)> for ChunkedArray<T> where
T: PolarsNumericType,
[src]fn from_iter<I: IntoIterator<Item = (AlignedVec<T::Native>, Option<Buffer>)>>(
iter: I
) -> Self
[src]
fn from_iter<I: IntoIterator<Item = (AlignedVec<T::Native>, Option<Buffer>)>>(
iter: I
) -> Self
[src]Creates a value from an iterator. Read more
impl<T> FromIterator<Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]
impl<T> FromIterator<Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]FromIterator trait
impl FromIterator<Option<bool>> for ChunkedArray<BooleanType>
[src]
impl FromIterator<Option<bool>> for ChunkedArray<BooleanType>
[src]impl<T> FromParallelIterator<Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]
impl<T> FromParallelIterator<Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]fn from_par_iter<I: IntoParallelIterator<Item = Option<T::Native>>>(
iter: I
) -> Self
[src]
fn from_par_iter<I: IntoParallelIterator<Item = Option<T::Native>>>(
iter: I
) -> Self
[src]Creates an instance of the collection from the parallel iterator par_iter
. Read more
impl<T> IntoGroupTuples for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
[src]
impl<T> IntoGroupTuples for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
[src]fn group_tuples(&self, multithreaded: bool) -> GroupTuples
[src]
fn group_tuples(&self, multithreaded: bool) -> GroupTuples
[src]Create the tuples need for a groupby operation. * The first value in the tuple is the first index of the group. * The second value in the tuple is are the indexes of the groups including the first value. Read more
impl<'a, T> IntoIterator for &'a ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<'a, T> IntoIterator for &'a ChunkedArray<T> where
T: PolarsNumericType,
[src]impl<'a, T> IntoTakeRandom<'a> for &'a ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<'a, T> IntoTakeRandom<'a> for &'a ChunkedArray<T> where
T: PolarsNumericType,
[src]type Item = T::Native
type TakeRandom = TakeRandBranch3<NumTakeRandomCont<'a, T::Native>, NumTakeRandomSingleChunk<'a, T>, NumTakeRandomChunked<'a, T>>
fn take_rand(&self) -> Self::TakeRandom
[src]
fn take_rand(&self) -> Self::TakeRandom
[src]Create a type that implements TakeRandom
.
impl<T> IsIn for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast + Copy,
[src]
impl<T> IsIn for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast + Copy,
[src]is_in
only.fn is_in(&self, other: &Series) -> Result<BooleanChunked>
[src]
fn is_in(&self, other: &Series) -> Result<BooleanChunked>
[src]Check if elements of this array are in the right Series, or List values of the right Series.
impl<T> IsNan for ChunkedArray<T> where
T: PolarsFloatType,
T::Native: Float,
[src]
impl<T> IsNan for ChunkedArray<T> where
T: PolarsFloatType,
T::Native: Float,
[src]fn is_nan(&self) -> BooleanChunked
[src]
fn is_not_nan(&self) -> BooleanChunked
[src]
fn is_finite(&self) -> BooleanChunked
[src]
fn is_infinite(&self) -> BooleanChunked
[src]
impl<T> Mul<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]
impl<T> Mul<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]impl<T> Mul<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]
impl<T> Mul<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]impl<T, N> Mul<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Mul<Output = T::Native>,
[src]
impl<T, N> Mul<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Mul<Output = T::Native>,
[src]impl<T, N> Mul<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Mul<Output = T::Native>,
[src]
impl<T, N> Mul<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Mul<Output = T::Native>,
[src]impl<T> NewChunkedArray<T, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]
impl<T> NewChunkedArray<T, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
T: PolarsPrimitiveType,
[src]fn new_from_iter(
name: &str,
it: impl Iterator<Item = T::Native>
) -> ChunkedArray<T>
[src]
fn new_from_iter(
name: &str,
it: impl Iterator<Item = T::Native>
) -> ChunkedArray<T>
[src]Create a new ChunkedArray from an iterator.
fn new_from_slice(name: &str, v: &[T::Native]) -> Self
[src]
fn new_from_opt_slice(name: &str, opt_v: &[Option<T::Native>]) -> Self
[src]
fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<T::Native>>
) -> ChunkedArray<T>
[src]
fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<T::Native>>
) -> ChunkedArray<T>
[src]Create a new ChunkedArray from an iterator.
impl<T> NumOpsDispatch for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Rem<Output = T::Native> + Zero + One,
ChunkedArray<T>: IntoSeries,
[src]
impl<T> NumOpsDispatch for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Rem<Output = T::Native> + Zero + One,
ChunkedArray<T>: IntoSeries,
[src]impl<T> Pow for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkCast,
[src]
impl<T> Pow for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkCast,
[src]fn pow_f32(&self, exp: f32) -> Float32Chunked
[src]
fn pow_f64(&self, exp: f64) -> Float64Chunked
[src]
impl<T> Rem<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Rem<Output = T::Native>,
[src]
impl<T> Rem<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Rem<Output = T::Native>,
[src]impl<T> Rem<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Rem<Output = T::Native>,
[src]
impl<T> Rem<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Rem<Output = T::Native>,
[src]impl<T, N> Rem<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Rem<Output = T::Native>,
[src]
impl<T, N> Rem<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Rem<Output = T::Native>,
[src]impl<T, N> Rem<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Rem<Output = T::Native>,
[src]
impl<T, N> Rem<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Rem<Output = T::Native>,
[src]impl<T> Sub<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]
impl<T> Sub<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]impl<T> Sub<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]
impl<T> Sub<ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero,
[src]impl<T, N> Sub<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Sub<Output = T::Native>,
[src]
impl<T, N> Sub<N> for &ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Sub<Output = T::Native>,
[src]impl<T, N> Sub<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Sub<Output = T::Native>,
[src]
impl<T, N> Sub<N> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
N: Num + ToPrimitive,
T::Native: Sub<Output = T::Native>,
[src]impl<T> TakeRandom for ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<T> TakeRandom for ChunkedArray<T> where
T: PolarsNumericType,
[src]impl<'a, T> TakeRandom for &'a ChunkedArray<T> where
T: PolarsNumericType,
[src]
impl<'a, T> TakeRandom for &'a ChunkedArray<T> where
T: PolarsNumericType,
[src]impl<T> ToDummies<T> for ChunkedArray<T> where
T: PolarsIntegerType + Sync,
T::Native: Hash + Eq + Display + NumCast,
ChunkedArray<T>: ChunkOps + ChunkCompare<T::Native> + ChunkUnique<T>,
[src]
impl<T> ToDummies<T> for ChunkedArray<T> where
T: PolarsIntegerType + Sync,
T::Native: Hash + Eq + Display + NumCast,
ChunkedArray<T>: ChunkOps + ChunkCompare<T::Native> + ChunkUnique<T>,
[src]fn to_dummies(&self) -> Result<DataFrame>
[src]
impl<T> VarAggSeries for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: PartialOrd + Num + NumCast,
[src]
impl<T> VarAggSeries for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: PartialOrd + Num + NumCast,
[src]fn var_as_series(&self) -> Series
[src]
fn var_as_series(&self) -> Series
[src]Get the variance of the ChunkedArray as a new Series of length 1.
fn std_as_series(&self) -> Series
[src]
fn std_as_series(&self) -> Series
[src]Get the standard deviation of the ChunkedArray as a new Series of length 1.
impl<T> VecHash for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: Hash,
[src]
impl<T> VecHash for ChunkedArray<T> where
T: PolarsIntegerType,
T::Native: Hash,
[src]fn vec_hash(&self, random_state: RandomState) -> UInt64Chunked
[src]
fn vec_hash(&self, random_state: RandomState) -> UInt64Chunked
[src]Compute the hash for all values in the array. Read more
impl<T> ZipOuterJoinColumn for ChunkedArray<T> where
T: PolarsIntegerType,
ChunkedArray<T>: IntoSeries,
[src]
impl<T> ZipOuterJoinColumn for ChunkedArray<T> where
T: PolarsIntegerType,
ChunkedArray<T>: IntoSeries,
[src]Auto Trait Implementations
impl<T> !RefUnwindSafe for ChunkedArray<T>
impl<T> Send for ChunkedArray<T> where
T: Send,
T: Send,
impl<T> Sync for ChunkedArray<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ChunkedArray<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for ChunkedArray<T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T, U> Cast<U> for T where
U: FromCast<T>,
impl<T, U> Cast<U> for T where
U: FromCast<T>,
pub fn cast(self) -> U
pub fn cast(self) -> U
Numeric cast from self
to T
.
impl<T> FromCast<T> for T
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
pub fn from_cast(t: T) -> T
Numeric cast from T
to Self
.
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,