Struct polars::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.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) -> 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
Append in place.
pub fn downcast_iter(
&self
) -> impl Iterator<Item = &PrimitiveArray<<T as PolarsNumericType>::Native>> + DoubleEndedIterator
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
<T as PolarsNumericType>::Native: Float,
ChunkedArray<T>: IntoSeries,
impl<T> ChunkedArray<T> where
T: PolarsNumericType,
<T as PolarsNumericType>::Native: Float,
ChunkedArray<T>: IntoSeries,
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 weights
vector. The resulting
values will be aggregated to their mean.
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 weights
vector. The resulting
values will be aggregated to their sum.
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 weights
vector. The resulting
values will be aggregated to their min.
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 weights
vector. The resulting
values will be aggregated to their max.
impl<T> ChunkedArray<T> where
T: PolarsFloatType,
ChunkedArray<T>: IntoSeries,
<T as PolarsNumericType>::Native: Float,
impl<T> ChunkedArray<T> where
T: PolarsFloatType,
ChunkedArray<T>: IntoSeries,
<T as PolarsNumericType>::Native: Float,
pub fn rolling_apply_float<F>(
&self,
window_size: usize,
f: F
) -> Result<ChunkedArray<T>, PolarsError> where
F: Fn(&ChunkedArray<T>) -> Option<<T as PolarsNumericType>::Native>,
pub fn rolling_apply_float<F>(
&self,
window_size: usize,
f: F
) -> Result<ChunkedArray<T>, PolarsError> where
F: Fn(&ChunkedArray<T>) -> Option<<T as PolarsNumericType>::Native>,
Apply a rolling custom function. This is pretty slow because of dynamic dispatch.
Apply a rolling var (moving var) 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 weights
vector. The resulting
values will be aggregated to their var.
Apply a rolling std (moving std) 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 weights
vector. The resulting
values will be aggregated to their std.
pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = bool> + Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen
pub fn into_no_null_iter(
&'a self
) -> impl Iterator<Item = &'a str> + Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen + 'a
pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = Series> + Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen
pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = &T> + Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen
pub fn into_no_null_iter(
&self
) -> impl Iterator<Item = u32> + Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen
pub fn to_ndarray(
&self
) -> Result<ArrayBase<ViewRepr<&<T as PolarsNumericType>::Native>, Dim<[usize; 1]>>, PolarsError>
pub fn to_ndarray(
&self
) -> Result<ArrayBase<ViewRepr<&<T as PolarsNumericType>::Native>, Dim<[usize; 1]>>, PolarsError>
If data is aligned in a single chunk and has no Null values a zero copy view is returned
as an ndarray
pub fn to_ndarray<N>(
&self
) -> Result<ArrayBase<OwnedRepr<<N as PolarsNumericType>::Native>, Dim<[usize; 2]>>, PolarsError> where
N: PolarsNumericType,
pub fn to_ndarray<N>(
&self
) -> Result<ArrayBase<OwnedRepr<<N as PolarsNumericType>::Native>, Dim<[usize; 2]>>, PolarsError> where
N: PolarsNumericType,
If all nested Series
have the same length, a 2 dimensional ndarray::Array
is returned.
pub unsafe fn get_object_unchecked(
&self,
index: usize
) -> Option<&(dyn PolarsObjectSafe + 'static)>
pub unsafe fn get_object_unchecked(
&self,
index: usize
) -> Option<&(dyn PolarsObjectSafe + 'static)>
Get a hold to an object that can be formatted or downcasted via the Any trait.
Safety
No bounds checks
Get a hold to an object that can be formatted or downcasted via the Any trait.
pub fn sample_n(
&self,
n: usize,
with_replacement: bool
) -> Result<ChunkedArray<T>, PolarsError>
pub fn sample_n(
&self,
n: usize,
with_replacement: bool
) -> Result<ChunkedArray<T>, PolarsError>
Sample n datapoints from this ChunkedArray.
pub fn sample_frac(
&self,
frac: f64,
with_replacement: bool
) -> Result<ChunkedArray<T>, PolarsError>
pub fn sample_frac(
&self,
frac: f64,
with_replacement: bool
) -> Result<ChunkedArray<T>, PolarsError>
Sample a fraction between 0.0-1.0 of this ChunkedArray.
pub fn rand_normal(
name: &str,
length: usize,
mean: f64,
std_dev: f64
) -> Result<ChunkedArray<T>, PolarsError>
pub fn rand_normal(
name: &str,
length: usize,
mean: f64,
std_dev: f64
) -> Result<ChunkedArray<T>, PolarsError>
Create ChunkedArray
with samples from a Normal distribution.
Create ChunkedArray
with samples from a Standard Normal distribution.
Create ChunkedArray
with samples from a Uniform distribution.
pub fn rand_bernoulli(
name: &str,
length: usize,
p: f64
) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn rand_bernoulli(
name: &str,
length: usize,
p: f64
) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create ChunkedArray
with samples from a Bernoulli distribution.
Extract json path, first match Refer to https://goessner.net/articles/JsonPath/
Get the length of the string values.
Check if strings contain a regex pattern
Replace the leftmost (sub)string by a regex pattern
pub fn replace_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
pub fn replace_all(
&self,
pat: &str,
val: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Replace all (sub)strings by a regex pattern
pub fn extract(
&self,
pat: &str,
group_index: usize
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
pub fn extract(
&self,
pat: &str,
group_index: usize
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Extract the nth capture group from pattern
Modify the strings to their lowercase equivalent
Modify the strings to their uppercase equivalent
Concat with the values from a second Utf8Chunked
pub fn str_slice(
&self,
start: i64,
length: Option<u64>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
pub fn str_slice(
&self,
start: i64,
length: Option<u64>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
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.
pub fn as_datetime(
&self,
fmt: Option<&str>
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
Get a reference to the mapping of categorical types to the string values.
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.
pub fn apply_amortized<'a, F>(&'a self, f: F) -> ChunkedArray<ListType> where
F: Fn(UnsafeSeries<'a>) -> Series + Copy,
pub fn apply_amortized<'a, F>(&'a self, f: F) -> ChunkedArray<ListType> where
F: Fn(UnsafeSeries<'a>) -> Series + Copy,
Apply a closure F
elementwise.
pub fn try_apply_amortized<'a, F>(
&'a self,
f: F
) -> Result<ChunkedArray<ListType>, PolarsError> where
F: Fn(UnsafeSeries<'a>) -> Result<Series, PolarsError> + Copy,
Get the index of the first non null value in this ChunkedArray.
Get the buffer of bits representing null values
Shrink the capacity of this array to fit it’s length.
pub fn unpack_series_matching_type(
&self,
series: &Series
) -> Result<&ChunkedArray<T>, PolarsError>
pub fn unpack_series_matching_type(
&self,
series: &Series
) -> Result<&ChunkedArray<T>, PolarsError>
Series to ChunkedArray
Unique id representing the number of chunks
Returns true if contains a single chunk and has no null values
Count the null values.
Take a view of top n elements
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)])
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
Get a mask of the null values.
Get a mask of the valid values.
Get the head of the ChunkedArray
Get the tail of the ChunkedArray
pub fn new_from_chunks(
name: &str,
chunks: Vec<Arc<dyn Array + 'static>, Global>
) -> ChunkedArray<T>
pub fn new_from_chunks(
name: &str,
chunks: Vec<Arc<dyn Array + 'static>, Global>
) -> ChunkedArray<T>
Create a new ChunkedArray from existing chunks.
pub fn new_from_aligned_vec(
name: &str,
v: MutableBuffer<<T as PolarsNumericType>::Native>
) -> ChunkedArray<T>
pub fn new_from_aligned_vec(
name: &str,
v: MutableBuffer<<T as PolarsNumericType>::Native>
) -> ChunkedArray<T>
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: MutableBuffer<<T as PolarsNumericType>::Native>,
buffer: Option<Bitmap>
) -> ChunkedArray<T>
pub fn new_from_owned_with_null_bitmap(
name: &str,
values: MutableBuffer<<T as PolarsNumericType>::Native>,
buffer: Option<Bitmap>
) -> ChunkedArray<T>
Nullify values in slice with an existing null bitmap
Contiguous slice
pub fn data_views(
&self
) -> impl Iterator<Item = &[<T as PolarsNumericType>::Native]> + DoubleEndedIterator
pub fn data_views(
&self
) -> impl Iterator<Item = &[<T as PolarsNumericType>::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 as PolarsNumericType>::Native> + Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen
Get the inner data type of the list.
We cannot override the left hand side behaviour. So we create a trait LhsNumOps. This allows for 1.add(&Series)
Apply lhs - self
Apply lhs / self
Apply lhs % self
Trait Implementations
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Add<&'_ ChunkedArray<T>>>::Output
pub fn add(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Add<&'_ ChunkedArray<T>>>::Output
Performs the +
operation. Read more
type Output = ChunkedArray<Utf8Type>
type Output = ChunkedArray<Utf8Type>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &'_ ChunkedArray<Utf8Type>
) -> <&'_ ChunkedArray<Utf8Type> as Add<&'_ ChunkedArray<Utf8Type>>>::Output
pub fn add(
self,
rhs: &'_ ChunkedArray<Utf8Type>
) -> <&'_ ChunkedArray<Utf8Type> as Add<&'_ ChunkedArray<Utf8Type>>>::Output
Performs the +
operation. Read more
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = ChunkedArray<Utf8Type>
type Output = ChunkedArray<Utf8Type>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: ChunkedArray<Utf8Type>
) -> <ChunkedArray<Utf8Type> as Add<ChunkedArray<Utf8Type>>>::Output
pub fn add(
self,
rhs: ChunkedArray<Utf8Type>
) -> <ChunkedArray<Utf8Type> as Add<ChunkedArray<Utf8Type>>>::Output
Performs the +
operation. Read more
impl<'_, 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,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the +
operator.
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the +
operator.
Performs the conversion.
Performs the conversion.
Performs the conversion.
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &'_ ChunkedArray<BooleanType>
) -> <&'_ ChunkedArray<BooleanType> as BitAnd<&'_ ChunkedArray<BooleanType>>>::Output
pub fn bitand(
self,
rhs: &'_ ChunkedArray<BooleanType>
) -> <&'_ ChunkedArray<BooleanType> as BitAnd<&'_ ChunkedArray<BooleanType>>>::Output
Performs the &
operation. Read more
type Output = ChunkedArray<Float32Type>
type Output = ChunkedArray<Float32Type>
The resulting type after applying the &
operator.
pub fn bitand(
self,
_rhs: &'_ ChunkedArray<Float32Type>
) -> <&'_ ChunkedArray<Float32Type> as BitAnd<&'_ ChunkedArray<Float32Type>>>::Output
pub fn bitand(
self,
_rhs: &'_ ChunkedArray<Float32Type>
) -> <&'_ ChunkedArray<Float32Type> as BitAnd<&'_ ChunkedArray<Float32Type>>>::Output
Performs the &
operation. Read more
type Output = ChunkedArray<Float64Type>
type Output = ChunkedArray<Float64Type>
The resulting type after applying the &
operator.
pub fn bitand(
self,
_rhs: &'_ ChunkedArray<Float64Type>
) -> <&'_ ChunkedArray<Float64Type> as BitAnd<&'_ ChunkedArray<Float64Type>>>::Output
pub fn bitand(
self,
_rhs: &'_ ChunkedArray<Float64Type>
) -> <&'_ ChunkedArray<Float64Type> as BitAnd<&'_ ChunkedArray<Float64Type>>>::Output
Performs the &
operation. Read more
impl<'_, T> BitAnd<&'_ ChunkedArray<T>> for &'_ ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: BitAnd<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as BitAnd<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
impl<'_, T> BitAnd<&'_ ChunkedArray<T>> for &'_ ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: BitAnd<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as BitAnd<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as BitAnd<&'_ ChunkedArray<T>>>::Output
pub fn bitand(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as BitAnd<&'_ ChunkedArray<T>>>::Output
Performs the &
operation. Read more
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: ChunkedArray<BooleanType>
) -> <ChunkedArray<BooleanType> as BitAnd<ChunkedArray<BooleanType>>>::Output
pub fn bitand(
self,
rhs: ChunkedArray<BooleanType>
) -> <ChunkedArray<BooleanType> as BitAnd<ChunkedArray<BooleanType>>>::Output
Performs the &
operation. Read more
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &'_ ChunkedArray<BooleanType>
) -> <&'_ ChunkedArray<BooleanType> as BitOr<&'_ ChunkedArray<BooleanType>>>::Output
pub fn bitor(
self,
rhs: &'_ ChunkedArray<BooleanType>
) -> <&'_ ChunkedArray<BooleanType> as BitOr<&'_ ChunkedArray<BooleanType>>>::Output
Performs the |
operation. Read more
type Output = ChunkedArray<Float32Type>
type Output = ChunkedArray<Float32Type>
The resulting type after applying the |
operator.
pub fn bitor(
self,
_rhs: &'_ ChunkedArray<Float32Type>
) -> <&'_ ChunkedArray<Float32Type> as BitOr<&'_ ChunkedArray<Float32Type>>>::Output
pub fn bitor(
self,
_rhs: &'_ ChunkedArray<Float32Type>
) -> <&'_ ChunkedArray<Float32Type> as BitOr<&'_ ChunkedArray<Float32Type>>>::Output
Performs the |
operation. Read more
type Output = ChunkedArray<Float64Type>
type Output = ChunkedArray<Float64Type>
The resulting type after applying the |
operator.
pub fn bitor(
self,
_rhs: &'_ ChunkedArray<Float64Type>
) -> <&'_ ChunkedArray<Float64Type> as BitOr<&'_ ChunkedArray<Float64Type>>>::Output
pub fn bitor(
self,
_rhs: &'_ ChunkedArray<Float64Type>
) -> <&'_ ChunkedArray<Float64Type> as BitOr<&'_ ChunkedArray<Float64Type>>>::Output
Performs the |
operation. Read more
impl<'_, T> BitOr<&'_ ChunkedArray<T>> for &'_ ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: BitOr<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as BitOr<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
impl<'_, T> BitOr<&'_ ChunkedArray<T>> for &'_ ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: BitOr<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as BitOr<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as BitOr<&'_ ChunkedArray<T>>>::Output
pub fn bitor(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as BitOr<&'_ ChunkedArray<T>>>::Output
Performs the |
operation. Read more
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: ChunkedArray<BooleanType>
) -> <ChunkedArray<BooleanType> as BitOr<ChunkedArray<BooleanType>>>::Output
pub fn bitor(
self,
rhs: ChunkedArray<BooleanType>
) -> <ChunkedArray<BooleanType> as BitOr<ChunkedArray<BooleanType>>>::Output
Performs the |
operation. Read more
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &'_ ChunkedArray<BooleanType>
) -> <&'_ ChunkedArray<BooleanType> as BitXor<&'_ ChunkedArray<BooleanType>>>::Output
pub fn bitxor(
self,
rhs: &'_ ChunkedArray<BooleanType>
) -> <&'_ ChunkedArray<BooleanType> as BitXor<&'_ ChunkedArray<BooleanType>>>::Output
Performs the ^
operation. Read more
type Output = ChunkedArray<Float32Type>
type Output = ChunkedArray<Float32Type>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
_rhs: &'_ ChunkedArray<Float32Type>
) -> <&'_ ChunkedArray<Float32Type> as BitXor<&'_ ChunkedArray<Float32Type>>>::Output
pub fn bitxor(
self,
_rhs: &'_ ChunkedArray<Float32Type>
) -> <&'_ ChunkedArray<Float32Type> as BitXor<&'_ ChunkedArray<Float32Type>>>::Output
Performs the ^
operation. Read more
type Output = ChunkedArray<Float64Type>
type Output = ChunkedArray<Float64Type>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
_rhs: &'_ ChunkedArray<Float64Type>
) -> <&'_ ChunkedArray<Float64Type> as BitXor<&'_ ChunkedArray<Float64Type>>>::Output
pub fn bitxor(
self,
_rhs: &'_ ChunkedArray<Float64Type>
) -> <&'_ ChunkedArray<Float64Type> as BitXor<&'_ ChunkedArray<Float64Type>>>::Output
Performs the ^
operation. Read more
impl<'_, T> BitXor<&'_ ChunkedArray<T>> for &'_ ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: BitXor<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as BitXor<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
impl<'_, T> BitXor<&'_ ChunkedArray<T>> for &'_ ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: BitXor<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as BitXor<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as BitXor<&'_ ChunkedArray<T>>>::Output
pub fn bitxor(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as BitXor<&'_ ChunkedArray<T>>>::Output
Performs the ^
operation. Read more
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: ChunkedArray<BooleanType>
) -> <ChunkedArray<BooleanType> as BitXor<ChunkedArray<BooleanType>>>::Output
pub fn bitxor(
self,
rhs: ChunkedArray<BooleanType>
) -> <ChunkedArray<BooleanType> as BitXor<ChunkedArray<BooleanType>>>::Output
Performs the ^
operation. Read more
impl<T> ChunkAgg<<T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
impl<T> ChunkAgg<<T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
Aggregate the sum of the ChunkedArray.
Returns None
if the array is empty or only contains null values. Read more
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
Returns the mean value in the array.
Returns None
if the array is empty or only contains null values. Read more
Returns the mean value in the array.
Returns None
if the array is empty or only contains null values. Read more
pub fn quantile(
&self,
quantile: f64
) -> Result<Option<<T as PolarsNumericType>::Native>, PolarsError>
pub fn quantile(
&self,
quantile: f64
) -> Result<Option<<T as PolarsNumericType>::Native>, PolarsError>
Aggregate a given quantile of the ChunkedArray.
Returns None
if the array is empty or only contains null values. Read more
Booleans are casted to 1 or 0.
Returns None
if the array is empty or only contains null values.
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
Returns the mean value in the array.
Returns None
if the array is empty or only contains null values. Read more
Returns the mean value in the array.
Returns None
if the array is empty or only contains null values. Read more
Get the sum of the ChunkedArray as a new Series of length 1.
Get the max of the ChunkedArray as a new Series of length 1.
Get the min of the ChunkedArray as a new Series of length 1.
Get the mean of the ChunkedArray as a new Series of length 1.
Get the median of the ChunkedArray as a new Series of length 1.
Get the quantile of the ChunkedArray as a new Series of length 1.
Get the sum of the ChunkedArray as a new Series of length 1.
Get the max of the ChunkedArray as a new Series of length 1.
Get the min of the ChunkedArray as a new Series of length 1.
Get the mean of the ChunkedArray as a new Series of length 1.
Get the median of the ChunkedArray as a new Series of length 1.
Get the quantile of the ChunkedArray as a new Series of length 1.
impl<T> ChunkAggSeries for ChunkedArray<T> where
T: PolarsNumericType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
ChunkedArray<T>: IntoSeries,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
impl<T> ChunkAggSeries for ChunkedArray<T> where
T: PolarsNumericType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
ChunkedArray<T>: IntoSeries,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
Get the sum of the ChunkedArray as a new Series of length 1.
Get the max of the ChunkedArray as a new Series of length 1.
Get the min of the ChunkedArray as a new Series of length 1.
Get the mean of the ChunkedArray as a new Series of length 1.
Get the median of the ChunkedArray as a new Series of length 1.
Get the quantile of the ChunkedArray as a new Series of length 1.
Get the sum of the ChunkedArray as a new Series of length 1.
Get the max of the ChunkedArray as a new Series of length 1.
Get the min of the ChunkedArray as a new Series of length 1.
Get the mean of the ChunkedArray as a new Series of length 1.
Get the median of the ChunkedArray as a new Series of length 1.
Get the quantile of the ChunkedArray as a new Series of length 1.
Get the sum of the ChunkedArray as a new Series of length 1.
Get the max of the ChunkedArray as a new Series of length 1.
Get the min of the ChunkedArray as a new Series of length 1.
Get the mean of the ChunkedArray as a new Series of length 1.
Get the median of the ChunkedArray as a new Series of length 1.
Get the quantile of the ChunkedArray as a new Series of length 1.
Get the sum of the ChunkedArray as a new Series of length 1.
Get the max of the ChunkedArray as a new Series of length 1.
Get the min of the ChunkedArray as a new Series of length 1.
Get the mean of the ChunkedArray as a new Series of length 1.
Get the median of the ChunkedArray as a new Series of length 1.
Get the quantile of the ChunkedArray as a new Series of length 1.
Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
Get a single value. Beware this is slow.
Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
Get a single value. Beware this is slow.
Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
Get a single value. Beware this is slow.
Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
Get a single value. Beware this is slow.
Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
Get a single value. Beware this is slow.
Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
Get a single value. Beware this is slow.
pub fn apply_cast_numeric<F, S>(&'a self, _f: F) -> ChunkedArray<S> where
F: Fn(&'a T) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn apply_cast_numeric<F, S>(&'a self, _f: F) -> ChunkedArray<S> where
F: Fn(&'a T) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
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
pub fn branch_apply_cast_numeric_no_null<F, S>(
&'a self,
_f: F
) -> ChunkedArray<S> where
F: Fn(Option<&'a T>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn branch_apply_cast_numeric_no_null<F, S>(
&'a self,
_f: F
) -> ChunkedArray<S> where
F: Fn(Option<&'a T>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
Apply a closure elementwise. This is fastest when the null check branching is more expensive than the closure application. Often it is. Read more
pub fn try_apply<F>(
&'a self,
_f: F
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError> where
F: Fn(&'a T) -> Result<T, PolarsError> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<ObjectType<T>> where
F: Fn(Option<&'a T>) -> Option<T> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<ObjectType<T>> where
F: Fn(Option<&'a T>) -> Option<T> + Copy,
Apply a closure elementwise including null values.
pub fn apply_with_idx<F>(&'a self, _f: F) -> ChunkedArray<ObjectType<T>> where
F: Fn((usize, &'a T)) -> T + Copy,
pub fn apply_with_idx<F>(&'a self, _f: F) -> ChunkedArray<ObjectType<T>> where
F: Fn((usize, &'a T)) -> T + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
pub fn apply_with_idx_on_opt<F>(&'a self, _f: F) -> ChunkedArray<ObjectType<T>> where
F: Fn((usize, Option<&'a T>)) -> Option<T> + Copy,
pub fn apply_with_idx_on_opt<F>(&'a self, _f: F) -> ChunkedArray<ObjectType<T>> where
F: Fn((usize, Option<&'a T>)) -> Option<T> + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
pub fn apply_cast_numeric<F, S>(&'a self, f: F) -> ChunkedArray<S> where
F: Fn(&'a str) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn apply_cast_numeric<F, S>(&'a self, f: F) -> ChunkedArray<S> where
F: Fn(&'a str) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
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
pub fn branch_apply_cast_numeric_no_null<F, S>(
&'a self,
f: F
) -> ChunkedArray<S> where
F: Fn(Option<&'a str>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn branch_apply_cast_numeric_no_null<F, S>(
&'a self,
f: F
) -> ChunkedArray<S> where
F: Fn(Option<&'a str>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
Apply a closure elementwise. This is fastest when the null check branching is more expensive than the closure application. Often it is. Read more
pub fn try_apply<F>(
&'a self,
f: F
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
F: Fn(&'a str) -> Result<Cow<'a, str>, PolarsError> + Copy,
Apply a closure elementwise including null values.
Apply a closure elementwise. The closure gets the index of the element as first argument.
Apply a closure elementwise. The closure gets the index of the element as first argument.
impl<'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,
pub fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(<T as PolarsNumericType>::Native) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(<T as PolarsNumericType>::Native) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
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
pub fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<<T as PolarsNumericType>::Native>) -> <S as PolarsNumericType>::Native,
S: PolarsNumericType,
pub fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<<T as PolarsNumericType>::Native>) -> <S as PolarsNumericType>::Native,
S: PolarsNumericType,
Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
pub fn apply<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn(<T as PolarsNumericType>::Native) -> <T as PolarsNumericType>::Native + Copy,
pub fn apply<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn(<T as PolarsNumericType>::Native) -> <T as PolarsNumericType>::Native + Copy,
Apply a closure elementwise. This is fastest when the null check branching is more expensive than the closure application. Often it is. Read more
pub fn try_apply<F>(&'a self, f: F) -> Result<ChunkedArray<T>, PolarsError> where
F: Fn(<T as PolarsNumericType>::Native) -> Result<<T as PolarsNumericType>::Native, PolarsError> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn(Option<<T as PolarsNumericType>::Native>) -> Option<<T as PolarsNumericType>::Native> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn(Option<<T as PolarsNumericType>::Native>) -> Option<<T as PolarsNumericType>::Native> + Copy,
Apply a closure elementwise including null values.
pub fn apply_with_idx<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn((usize, <T as PolarsNumericType>::Native)) -> <T as PolarsNumericType>::Native + Copy,
pub fn apply_with_idx<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn((usize, <T as PolarsNumericType>::Native)) -> <T as PolarsNumericType>::Native + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
pub fn apply_with_idx_on_opt<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn((usize, Option<<T as PolarsNumericType>::Native>)) -> Option<<T as PolarsNumericType>::Native> + Copy,
pub fn apply_with_idx_on_opt<F>(&'a self, f: F) -> ChunkedArray<T> where
F: Fn((usize, Option<<T as PolarsNumericType>::Native>)) -> Option<<T as PolarsNumericType>::Native> + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
pub fn apply_to_slice<F, V>(&'a self, f: F, slice: &mut [V]) where
F: Fn(Option<<T as PolarsNumericType>::Native>, &V) -> V,
pub fn apply_to_slice<F, V>(&'a self, f: F, slice: &mut [V]) where
F: Fn(Option<<T as PolarsNumericType>::Native>, &V) -> V,
Apply a closure elementwise and write results to a mutable slice.
Apply a closure F
elementwise.
Apply a closure elementwise. The closure gets the index of the element as first argument.
Apply a closure elementwise. The closure gets the index of the element as first argument.
pub fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Series) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Series) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
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
pub fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<Series>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<Series>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
pub fn try_apply<F>(
&'a self,
f: F
) -> Result<ChunkedArray<ListType>, PolarsError> where
F: Fn(Series) -> Result<Series, PolarsError> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<ListType> where
F: Fn(Option<Series>) -> Option<Series> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<ListType> where
F: Fn(Option<Series>) -> Option<Series> + Copy,
Apply a closure elementwise including null values.
pub fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(bool) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(bool) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
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
pub fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<bool>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
pub fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<bool>) -> <S as PolarsNumericType>::Native + Copy,
S: PolarsNumericType,
Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
Apply a closure elementwise. This is fastest when the null check branching is more expensive than the closure application. Often it is. Read more
pub fn try_apply<F>(
&self,
f: F
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
F: Fn(bool) -> Result<bool, PolarsError> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<BooleanType> where
F: Fn(Option<bool>) -> Option<bool> + Copy,
pub fn apply_on_opt<F>(&'a self, f: F) -> ChunkedArray<BooleanType> where
F: Fn(Option<bool>) -> Option<bool> + Copy,
Apply a closure elementwise including null values.
pub fn apply_with_idx<F>(&'a self, f: F) -> ChunkedArray<BooleanType> where
F: Fn((usize, bool)) -> bool + Copy,
pub fn apply_with_idx<F>(&'a self, f: F) -> ChunkedArray<BooleanType> where
F: Fn((usize, bool)) -> bool + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
pub fn apply_with_idx_on_opt<F>(&'a self, f: F) -> ChunkedArray<BooleanType> where
F: Fn((usize, Option<bool>)) -> Option<bool> + Copy,
pub fn apply_with_idx_on_opt<F>(&'a self, f: F) -> ChunkedArray<BooleanType> where
F: Fn((usize, Option<bool>)) -> Option<bool> + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
pub fn apply_kernel<F>(&self, f: F) -> ChunkedArray<BooleanType> where
F: Fn(&BooleanArray) -> Arc<dyn Array + 'static>,
pub fn apply_kernel<F>(&self, f: F) -> ChunkedArray<BooleanType> where
F: Fn(&BooleanArray) -> Arc<dyn Array + 'static>,
Apply kernel and return result as a new ChunkedArray.
pub fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&BooleanArray) -> Arc<dyn Array + 'static>,
S: PolarsDataType,
pub fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&BooleanArray) -> Arc<dyn Array + 'static>,
S: PolarsDataType,
Apply a kernel that outputs an array of different type.
impl<T> ChunkApplyKernel<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> ChunkApplyKernel<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn apply_kernel<F>(&self, f: F) -> ChunkedArray<T> where
F: Fn(&PrimitiveArray<<T as PolarsNumericType>::Native>) -> Arc<dyn Array + 'static>,
pub fn apply_kernel<F>(&self, f: F) -> ChunkedArray<T> where
F: Fn(&PrimitiveArray<<T as PolarsNumericType>::Native>) -> Arc<dyn Array + 'static>,
Apply kernel and return result as a new ChunkedArray.
pub fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&PrimitiveArray<<T as PolarsNumericType>::Native>) -> Arc<dyn Array + 'static>,
S: PolarsDataType,
pub fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&PrimitiveArray<<T as PolarsNumericType>::Native>) -> Arc<dyn Array + 'static>,
S: PolarsDataType,
Apply a kernel that outputs an array of different type.
pub fn apply_kernel<F>(&self, f: F) -> ChunkedArray<Utf8Type> where
F: Fn(&Utf8Array<i64>) -> Arc<dyn Array + 'static>,
pub fn apply_kernel<F>(&self, f: F) -> ChunkedArray<Utf8Type> where
F: Fn(&Utf8Array<i64>) -> Arc<dyn Array + 'static>,
Apply kernel and return result as a new ChunkedArray.
pub fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&Utf8Array<i64>) -> Arc<dyn Array + 'static>,
S: PolarsDataType,
pub fn apply_kernel_cast<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(&Utf8Array<i64>) -> Arc<dyn Array + 'static>,
S: PolarsDataType,
Apply a kernel that outputs an array of different type.
We cannot cast anything to or from List/LargeList So this implementation casts the inner type
Check for equality and regard missing values as equal.
Check for equality.
Check for inequality.
Greater than comparison.
Greater than or equal comparison.
Less than comparison.
Less than or equal comparison
Check for equality and regard missing values as equal.
Check for equality.
Check for inequality.
Greater than comparison.
Greater than or equal comparison.
Less than comparison.
Less than or equal comparison
Check for equality and regard missing values as equal.
Check for equality.
Check for inequality.
Greater than comparison.
Greater than or equal comparison.
Less than comparison.
Less than or equal comparison
Check for equality and regard missing values as equal.
Check for equality.
Check for inequality.
Greater than comparison.
Greater than or equal comparison.
Less than comparison.
Less than or equal comparison
Check for equality and regard missing values as equal.
Check for equality.
Check for inequality.
Greater than comparison.
Greater than or equal comparison.
Less than comparison.
Less than or equal comparison
impl<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,
Check for equality and regard missing values as equal.
Check for equality.
Check for inequality.
Greater than comparison.
Greater than or equal comparison.
Less than comparison.
Less than or equal comparison
impl<T> ChunkCumAgg<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: FromIterator<Option<<T as PolarsNumericType>::Native>>,
impl<T> ChunkCumAgg<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: FromIterator<Option<<T as PolarsNumericType>::Native>>,
Get an array with the cumulative max computed at every element
Get an array with the cumulative min computed at every element
Get an array with the cumulative sum computed at every element
Get an array with the cumulative product computed at every element
Create a new ChunkedArray filled with values at that index.
Create a new ChunkedArray filled with values at that index.
Create a new ChunkedArray filled with values at that index.
Create a new ChunkedArray filled with values at that index.
impl<T> ChunkExpandAtIndex<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkFull<<T as PolarsNumericType>::Native>,
ChunkedArray<T>: TakeRandom,
<ChunkedArray<T> as TakeRandom>::Item == <T as PolarsNumericType>::Native,
impl<T> ChunkExpandAtIndex<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkFull<<T as PolarsNumericType>::Native>,
ChunkedArray<T>: TakeRandom,
<ChunkedArray<T> as TakeRandom>::Item == <T as PolarsNumericType>::Native,
Create a new ChunkedArray filled with values at that index.
Create a new ChunkedArray filled with values at that index.
pub fn fill_null(
&self,
_strategy: FillNullStrategy
) -> Result<ChunkedArray<ListType>, PolarsError>
pub fn fill_null(
&self,
_strategy: FillNullStrategy
) -> Result<ChunkedArray<ListType>, PolarsError>
Replace None values with one of the following strategies: Read more
pub fn fill_null(
&self,
strategy: FillNullStrategy
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
pub fn fill_null(
&self,
strategy: FillNullStrategy
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Replace None values with one of the following strategies: Read more
pub fn fill_null(
&self,
strategy: FillNullStrategy
) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn fill_null(
&self,
strategy: FillNullStrategy
) -> Result<ChunkedArray<BooleanType>, PolarsError>
Replace None values with one of the following strategies: Read more
pub fn fill_null(
&self,
_strategy: FillNullStrategy
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError>
pub fn fill_null(
&self,
_strategy: FillNullStrategy
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError>
Replace None values with one of the following strategies: Read more
pub fn fill_null(
&self,
_strategy: FillNullStrategy
) -> Result<ChunkedArray<CategoricalType>, PolarsError>
pub fn fill_null(
&self,
_strategy: FillNullStrategy
) -> Result<ChunkedArray<CategoricalType>, PolarsError>
Replace None values with one of the following strategies: Read more
impl<T> ChunkFillNull for ChunkedArray<T> where
T: PolarsNumericType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
impl<T> ChunkFillNull for ChunkedArray<T> where
T: PolarsNumericType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
Replace None values with one of the following strategies: Read more
pub fn fill_null_with_values(
&self,
_value: &Series
) -> Result<ChunkedArray<ListType>, PolarsError>
pub fn fill_null_with_values(
&self,
_value: &Series
) -> Result<ChunkedArray<ListType>, PolarsError>
Replace None values with a give value T
.
pub fn fill_null_with_values(
&self,
value: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
pub fn fill_null_with_values(
&self,
value: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Replace None values with a give value T
.
impl<T> ChunkFillNullValue<<T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> ChunkFillNullValue<<T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn fill_null_with_values(
&self,
value: <T as PolarsNumericType>::Native
) -> Result<ChunkedArray<T>, PolarsError>
pub fn fill_null_with_values(
&self,
value: <T as PolarsNumericType>::Native
) -> Result<ChunkedArray<T>, PolarsError>
Replace None values with a give value T
.
pub fn fill_null_with_values(
&self,
_value: ObjectType<T>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError>
pub fn fill_null_with_values(
&self,
_value: ObjectType<T>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError>
Replace None values with a give value T
.
pub fn fill_null_with_values(
&self,
value: bool
) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn fill_null_with_values(
&self,
value: bool
) -> Result<ChunkedArray<BooleanType>, PolarsError>
Replace None values with a give value T
.
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<BooleanType>, PolarsError>
Filter values in the ChunkedArray with a boolean mask. Read more
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<CategoricalType>, PolarsError> where
ChunkedArray<CategoricalType>: Sized,
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<CategoricalType>, PolarsError> where
ChunkedArray<CategoricalType>: Sized,
Filter values in the ChunkedArray with a boolean mask. Read more
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<ListType>, PolarsError>
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<ListType>, PolarsError>
Filter values in the ChunkedArray with a boolean mask. Read more
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError> where
ChunkedArray<ObjectType<T>>: Sized,
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError> where
ChunkedArray<ObjectType<T>>: Sized,
Filter values in the ChunkedArray with a boolean mask. Read more
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<T>, PolarsError>
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<T>, PolarsError>
Filter values in the ChunkedArray with a boolean mask. Read more
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
pub fn filter(
&self,
filter: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Filter values in the ChunkedArray with a boolean mask. Read more
impl<T> ChunkFull<<T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> ChunkFull<<T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn full(
name: &str,
value: <T as PolarsNumericType>::Native,
length: usize
) -> ChunkedArray<T>
pub fn full(
name: &str,
value: <T as PolarsNumericType>::Native,
length: usize
) -> ChunkedArray<T>
Create a ChunkedArray with a single value.
Create a ChunkedArray with a single value.
Aggregate to contiguous memory.
Aggregate to contiguous memory.
Aggregate to contiguous memory.
pub fn rechunk(&self) -> ChunkedArray<CategoricalType> where
ChunkedArray<CategoricalType>: Sized,
pub fn rechunk(&self) -> ChunkedArray<CategoricalType> where
ChunkedArray<CategoricalType>: Sized,
Aggregate to contiguous memory.
Aggregate to contiguous memory.
Aggregate to contiguous memory.
Get a boolean mask of the local maximum peaks.
Get a boolean mask of the local minimum peaks.
Return a reversed version of this array.
Return a reversed version of this array.
Return a reversed version of this array.
Return a reversed version of this array.
impl<T> ChunkReverse<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkOps,
impl<T> ChunkReverse<T> for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: ChunkOps,
Return a reversed version of this array.
Return a reversed version of this array.
impl<T> ChunkRollApply for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
impl<T> ChunkRollApply for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
pub fn rolling_apply(
&self,
window_size: usize,
f: &dyn Fn(&Series)
) -> Result<ChunkedArray<T>, PolarsError>
pub fn rolling_apply(
&self,
window_size: usize,
f: &dyn Fn(&Series)
) -> Result<ChunkedArray<T>, PolarsError>
Apply a rolling custom function. This is pretty slow because of dynamic dispatch.
pub fn set_at_idx<I>(
&'a self,
idx: I,
opt_value: Option<&'a str>
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
I: IntoIterator<Item = usize>,
ChunkedArray<Utf8Type>: Sized,
pub fn set_at_idx<I>(
&'a self,
idx: I,
opt_value: Option<&'a str>
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
I: IntoIterator<Item = usize>,
ChunkedArray<Utf8Type>: Sized,
Set the values at indexes idx
to some optional value Option<T>
. Read more
pub fn set_at_idx_with<I, F>(
&'a self,
idx: I,
f: F
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
I: IntoIterator<Item = usize>,
F: Fn(Option<&'a str>) -> Option<String>,
ChunkedArray<Utf8Type>: Sized,
pub fn set_at_idx_with<I, F>(
&'a self,
idx: I,
f: F
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
I: IntoIterator<Item = usize>,
F: Fn(Option<&'a str>) -> Option<String>,
ChunkedArray<Utf8Type>: Sized,
Set the values at indexes idx
by applying a closure to these values. Read more
pub fn set(
&'a self,
mask: &ChunkedArray<BooleanType>,
value: Option<&'a str>
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
ChunkedArray<Utf8Type>: Sized,
pub fn set(
&'a self,
mask: &ChunkedArray<BooleanType>,
value: Option<&'a str>
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
ChunkedArray<Utf8Type>: Sized,
Set the values where the mask evaluates to true
to some optional value Option<T>
. Read more
pub fn set_with<F>(
&'a self,
mask: &ChunkedArray<BooleanType>,
f: F
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
F: Fn(Option<&'a str>) -> Option<String>,
ChunkedArray<Utf8Type>: Sized,
pub fn set_with<F>(
&'a self,
mask: &ChunkedArray<BooleanType>,
f: F
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
F: Fn(Option<&'a str>) -> Option<String>,
ChunkedArray<Utf8Type>: Sized,
Set the values where the mask evaluates to true
by applying a closure to these values. Read more
impl<'a, T> ChunkSet<'a, <T as PolarsNumericType>::Native, <T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
impl<'a, T> ChunkSet<'a, <T as PolarsNumericType>::Native, <T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn set_at_idx<I>(
&'a self,
idx: I,
value: Option<<T as PolarsNumericType>::Native>
) -> Result<ChunkedArray<T>, PolarsError> where
I: IntoIterator<Item = usize>,
pub fn set_at_idx<I>(
&'a self,
idx: I,
value: Option<<T as PolarsNumericType>::Native>
) -> Result<ChunkedArray<T>, PolarsError> where
I: IntoIterator<Item = usize>,
Set the values at indexes idx
to some optional value Option<T>
. Read more
pub fn set_at_idx_with<I, F>(
&'a self,
idx: I,
f: F
) -> Result<ChunkedArray<T>, PolarsError> where
I: IntoIterator<Item = usize>,
F: Fn(Option<<T as PolarsNumericType>::Native>) -> Option<<T as PolarsNumericType>::Native>,
pub fn set_at_idx_with<I, F>(
&'a self,
idx: I,
f: F
) -> Result<ChunkedArray<T>, PolarsError> where
I: IntoIterator<Item = usize>,
F: Fn(Option<<T as PolarsNumericType>::Native>) -> Option<<T as PolarsNumericType>::Native>,
Set the values at indexes idx
by applying a closure to these values. Read more
pub fn set(
&'a self,
mask: &ChunkedArray<BooleanType>,
value: Option<<T as PolarsNumericType>::Native>
) -> Result<ChunkedArray<T>, PolarsError>
pub fn set(
&'a self,
mask: &ChunkedArray<BooleanType>,
value: Option<<T as PolarsNumericType>::Native>
) -> Result<ChunkedArray<T>, PolarsError>
Set the values where the mask evaluates to true
to some optional value Option<T>
. Read more
pub fn set_with<F>(
&'a self,
mask: &ChunkedArray<BooleanType>,
f: F
) -> Result<ChunkedArray<T>, PolarsError> where
F: Fn(Option<<T as PolarsNumericType>::Native>) -> Option<<T as PolarsNumericType>::Native>,
pub fn set_with<F>(
&'a self,
mask: &ChunkedArray<BooleanType>,
f: F
) -> Result<ChunkedArray<T>, PolarsError> where
F: Fn(Option<<T as PolarsNumericType>::Native>) -> Option<<T as PolarsNumericType>::Native>,
Set the values where the mask evaluates to true
by applying a closure to these values. Read more
pub fn set_at_idx<I>(
&'a self,
idx: I,
value: Option<bool>
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
I: IntoIterator<Item = usize>,
pub fn set_at_idx<I>(
&'a self,
idx: I,
value: Option<bool>
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
I: IntoIterator<Item = usize>,
Set the values at indexes idx
to some optional value Option<T>
. Read more
pub fn set_at_idx_with<I, F>(
&'a self,
idx: I,
f: F
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
I: IntoIterator<Item = usize>,
F: Fn(Option<bool>) -> Option<bool>,
pub fn set_at_idx_with<I, F>(
&'a self,
idx: I,
f: F
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
I: IntoIterator<Item = usize>,
F: Fn(Option<bool>) -> Option<bool>,
Set the values at indexes idx
by applying a closure to these values. Read more
pub fn set(
&'a self,
mask: &ChunkedArray<BooleanType>,
value: Option<bool>
) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn set(
&'a self,
mask: &ChunkedArray<BooleanType>,
value: Option<bool>
) -> Result<ChunkedArray<BooleanType>, PolarsError>
Set the values where the mask evaluates to true
to some optional value Option<T>
. Read more
pub fn set_with<F>(
&'a self,
mask: &ChunkedArray<BooleanType>,
f: F
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
F: Fn(Option<bool>) -> Option<bool>,
pub fn set_with<F>(
&'a self,
mask: &ChunkedArray<BooleanType>,
f: F
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
F: Fn(Option<bool>) -> Option<bool>,
Set the values where the mask evaluates to true
by applying a closure to these values. Read more
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<bool>
) -> ChunkedArray<BooleanType>
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<bool>
) -> ChunkedArray<BooleanType>
Shift the values by a given period and fill the parts that will be empty due to this operation
with fill_value
. Read more
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<&Series>
) -> ChunkedArray<ListType>
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<&Series>
) -> ChunkedArray<ListType>
Shift the values by a given period and fill the parts that will be empty due to this operation
with fill_value
. Read more
pub fn shift_and_fill(
&self,
_periods: i64,
_fill_value: Option<ObjectType<T>>
) -> ChunkedArray<ObjectType<T>>
pub fn shift_and_fill(
&self,
_periods: i64,
_fill_value: Option<ObjectType<T>>
) -> ChunkedArray<ObjectType<T>>
Shift the values by a given period and fill the parts that will be empty due to this operation
with fill_value
. Read more
impl<T> ChunkShiftFill<T, Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> ChunkShiftFill<T, Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<<T as PolarsNumericType>::Native>
) -> ChunkedArray<T>
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<<T as PolarsNumericType>::Native>
) -> ChunkedArray<T>
Shift the values by a given period and fill the parts that will be empty due to this operation
with fill_value
. Read more
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<&str>
) -> ChunkedArray<Utf8Type>
pub fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<&str>
) -> ChunkedArray<Utf8Type>
Shift the values by a given period and fill the parts that will be empty due to this operation
with fill_value
. Read more
Returned a sorted ChunkedArray
.
Sort this array in place.
Retrieve the indexes needed to sort this array.
fn argsort_multiple(
&self,
_other: &[Series],
_reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
fn argsort_multiple(
&self,
_other: &[Series],
_reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
Retrieve the indexes need to sort this and the other arrays.
Returned a sorted ChunkedArray
.
Sort this array in place.
Retrieve the indexes needed to sort this array.
fn argsort_multiple(
&self,
_other: &[Series],
_reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
fn argsort_multiple(
&self,
_other: &[Series],
_reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
Retrieve the indexes need to sort this and the other arrays.
pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
Panics
This function is very opinionated.
We assume that all numeric Series
are of the same type, if not it will panic
Returned a sorted ChunkedArray
.
Sort this array in place.
Retrieve the indexes needed to sort this array.
pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
Panics
This function is very opinionated. On the implementation of ChunkedArray<T>
for numeric types,
we assume that all numeric Series
are of the same type.
In this case we assume that all numeric Series
are f64
types. The caller needs to
uphold this contract. If not, it will panic.
Returned a sorted ChunkedArray
.
Sort this array in place.
Retrieve the indexes needed to sort this array.
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<BooleanType> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<BooleanType>: Sized,
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<BooleanType> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<BooleanType>: Sized,
Take values from ChunkedArray by index. Read more
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<BooleanType>: Sized,
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<BooleanType>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<BooleanType>: Sized,
Take values from ChunkedArray by index. Note that the iterator will be cloned, so prefer an iterator that takes the owned memory by reference. Read more
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<Utf8Type> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<Utf8Type>: Sized,
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<Utf8Type> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<Utf8Type>: Sized,
Take values from ChunkedArray by index. Read more
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<Utf8Type>: Sized,
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<Utf8Type>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<Utf8Type>: Sized,
Take values from ChunkedArray by index. Note that the iterator will be cloned, so prefer an iterator that takes the owned memory by reference. Read more
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<CategoricalType> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<CategoricalType>: Sized,
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<CategoricalType> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<CategoricalType>: Sized,
Take values from ChunkedArray by index. Read more
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<CategoricalType>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<CategoricalType>: Sized,
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<CategoricalType>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<CategoricalType>: Sized,
Take values from ChunkedArray by index. Note that the iterator will be cloned, so prefer an iterator that takes the owned memory by reference. Read more
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<ListType> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ListType>: Sized,
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<ListType> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ListType>: Sized,
Take values from ChunkedArray by index. Read more
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<ListType>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ListType>: Sized,
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<ListType>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ListType>: Sized,
Take values from ChunkedArray by index. Note that the iterator will be cloned, so prefer an iterator that takes the owned memory by reference. Read more
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<T> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<T>: Sized,
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<T> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<T>: Sized,
Take values from ChunkedArray by index. Read more
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<T>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<T>: Sized,
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<T>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<T>: Sized,
Take values from ChunkedArray by index. Note that the iterator will be cloned, so prefer an iterator that takes the owned memory by reference. Read more
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<ObjectType<T>> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ObjectType<T>>: Sized,
pub unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> ChunkedArray<ObjectType<T>> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ObjectType<T>>: Sized,
Take values from ChunkedArray by index. Read more
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ObjectType<T>>: Sized,
pub fn take<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError> where
I: TakeIterator,
INulls: TakeIteratorNulls,
ChunkedArray<ObjectType<T>>: Sized,
Take values from ChunkedArray by index. Note that the iterator will be cloned, so prefer an iterator that takes the owned memory by reference. Read more
Traverse and collect every nth element in a new array.
Traverse and collect every nth element in a new array.
Traverse and collect every nth element in a new array.
Traverse and collect every nth element in a new array.
Traverse and collect every nth element in a new array.
Traverse and collect every nth element in a new array.
Get unique values of a ChunkedArray
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
Get a mask of all the unique values.
Get a mask of all the duplicated values.
Number of unique values in the ChunkedArray
Count the unique values.
The most occurring value(s). Can return multiple Values
Get unique values of a ChunkedArray
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
Get a mask of all the unique values.
Get a mask of all the duplicated values.
Count the unique values.
Number of unique values in the ChunkedArray
The most occurring value(s). Can return multiple Values
Get unique values of a ChunkedArray
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
Get a mask of all the unique values.
Get a mask of all the duplicated values.
Count the unique values.
Number of unique values in the ChunkedArray
The most occurring value(s). Can return multiple Values
Get unique values of a ChunkedArray
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
Get a mask of all the unique values.
Get a mask of all the duplicated values.
Count the unique values.
Number of unique values in the ChunkedArray
The most occurring value(s). Can return multiple Values
Get unique values of a ChunkedArray
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
Number of unique values in the ChunkedArray
Get a mask of all the unique values.
Get a mask of all the duplicated values.
Count the unique values.
The most occurring value(s). Can return multiple Values
impl<T> ChunkUnique<T> for ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: Hash,
<T as PolarsNumericType>::Native: Eq,
ChunkedArray<T>: ChunkOps,
ChunkedArray<T>: IntoSeries,
impl<T> ChunkUnique<T> for ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: Hash,
<T as PolarsNumericType>::Native: Eq,
ChunkedArray<T>: ChunkOps,
ChunkedArray<T>: IntoSeries,
Get unique values of a ChunkedArray
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
Get a mask of all the unique values.
Get a mask of all the duplicated values.
Count the unique values.
Number of unique values in the ChunkedArray
The most occurring value(s). Can return multiple Values
Get unique values of a ChunkedArray
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
Get a mask of all the unique values.
Get a mask of all the duplicated values.
Count the unique values.
Number of unique values in the ChunkedArray
The most occurring value(s). Can return multiple Values
impl<T> ChunkVar<f64> for ChunkedArray<T> where
T: PolarsIntegerType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
impl<T> ChunkVar<f64> for ChunkedArray<T> where
T: PolarsIntegerType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<BooleanType>
) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<CategoricalType>
) -> Result<ChunkedArray<CategoricalType>, PolarsError>
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<CategoricalType>
) -> Result<ChunkedArray<CategoricalType>, PolarsError>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<ListType>
) -> Result<ChunkedArray<ListType>, PolarsError>
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<ListType>
) -> Result<ChunkedArray<ListType>, PolarsError>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<ObjectType<T>>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError>
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<ObjectType<T>>
) -> Result<ChunkedArray<ObjectType<T>>, PolarsError>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<T>
) -> Result<ChunkedArray<T>, PolarsError>
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<T>
) -> Result<ChunkedArray<T>, PolarsError>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<Utf8Type>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
pub fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<Utf8Type>
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
Returns the “default value” for a type. Read more
type Target = ChunkedArray<UInt32Type>
type Target = ChunkedArray<UInt32Type>
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Div<&'_ ChunkedArray<T>>>::Output
pub fn div(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Div<&'_ ChunkedArray<T>>>::Output
Performs the /
operation. Read more
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the /
operator.
Performs the /
operation. Read more
impl<'_, 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,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the /
operator.
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the /
operator.
Conversion from UInt32Chunked to Unchecked TakeIdx
pub fn from(
ca: &'a ChunkedArray<UInt32Type>
) -> TakeIdx<'a, Once<usize>, Once<Option<usize>>>
pub fn from(
ca: &'a ChunkedArray<UInt32Type>
) -> TakeIdx<'a, Once<usize>, Once<Option<usize>>>
Performs the conversion.
impl<'_, T> From<(&'_ str, PrimitiveArray<<T as PolarsNumericType>::Native>)> for ChunkedArray<T> where
T: PolarsNumericType,
impl<'_, T> From<(&'_ str, PrimitiveArray<<T as PolarsNumericType>::Native>)> for ChunkedArray<T> where
T: PolarsNumericType,
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
impl<T> From<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> From<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
Performs the conversion.
impl<T> FromIterator<(MutableBuffer<<T as PolarsNumericType>::Native>, Option<Bitmap>)> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> FromIterator<(MutableBuffer<<T as PolarsNumericType>::Native>, Option<Bitmap>)> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn from_iter<I>(iter: I) -> ChunkedArray<T> where
I: IntoIterator<Item = (MutableBuffer<<T as PolarsNumericType>::Native>, Option<Bitmap>)>,
pub fn from_iter<I>(iter: I) -> ChunkedArray<T> where
I: IntoIterator<Item = (MutableBuffer<<T as PolarsNumericType>::Native>, Option<Bitmap>)>,
Creates a value from an iterator. Read more
impl<T> FromIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> FromIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
FromIterator trait
pub fn from_iter<I>(iter: I) -> ChunkedArray<T> where
I: IntoIterator<Item = Option<<T as PolarsNumericType>::Native>>,
pub fn from_iter<I>(iter: I) -> ChunkedArray<T> where
I: IntoIterator<Item = Option<<T as PolarsNumericType>::Native>>,
Creates a value from an iterator. Read more
pub fn from_iter<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoIterator<Item = Option<Ptr>>,
pub fn from_iter<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoIterator<Item = Option<Ptr>>,
Creates a value from an iterator. Read more
pub fn from_iter<I>(iter: I) -> ChunkedArray<ListType> where
I: IntoIterator<Item = Option<Ptr>>,
pub fn from_iter<I>(iter: I) -> ChunkedArray<ListType> where
I: IntoIterator<Item = Option<Ptr>>,
Creates a value from an iterator. Read more
pub fn from_iter<I>(iter: I) -> ChunkedArray<ObjectType<T>> where
I: IntoIterator<Item = Option<T>>,
pub fn from_iter<I>(iter: I) -> ChunkedArray<ObjectType<T>> where
I: IntoIterator<Item = Option<T>>,
Creates a value from an iterator. Read more
pub fn from_iter<I>(iter: I) -> ChunkedArray<BooleanType> where
I: IntoIterator<Item = Option<bool>>,
pub fn from_iter<I>(iter: I) -> ChunkedArray<BooleanType> where
I: IntoIterator<Item = Option<bool>>,
Creates a value from an iterator. Read more
Creates a value from an iterator. Read more
Creates a value from an iterator. Read more
Creates a value from an iterator. Read more
impl<T> FromIteratorReversed<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> FromIteratorReversed<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn from_trusted_len_iter_rev<I>(iter: I) -> ChunkedArray<T> where
I: TrustedLen<Item = Option<<T as PolarsNumericType>::Native>>,
impl<T> FromParallelIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> FromParallelIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<T> where
I: IntoParallelIterator<Item = Option<<T as PolarsNumericType>::Native>>,
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<T> where
I: IntoParallelIterator<Item = Option<<T as PolarsNumericType>::Native>>,
Creates an instance of the collection from the parallel iterator par_iter
. Read more
impl<Ptr> FromParallelIterator<Option<Ptr>> for ChunkedArray<Utf8Type> where
Ptr: AsRef<str> + Send + Sync,
impl<Ptr> FromParallelIterator<Option<Ptr>> for ChunkedArray<Utf8Type> where
Ptr: AsRef<str> + Send + Sync,
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoParallelIterator<Item = Option<Ptr>>,
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoParallelIterator<Item = Option<Ptr>>,
Creates an instance of the collection from the parallel iterator par_iter
. Read more
impl<Ptr> FromParallelIterator<Ptr> for ChunkedArray<Utf8Type> where
Ptr: PolarsAsRef<str> + Send + Sync,
impl<Ptr> FromParallelIterator<Ptr> for ChunkedArray<Utf8Type> where
Ptr: PolarsAsRef<str> + Send + Sync,
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoParallelIterator<Item = Ptr>,
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoParallelIterator<Item = Ptr>,
Creates an instance of the collection from the parallel iterator par_iter
. Read more
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<BooleanType> where
I: IntoParallelIterator<Item = bool>,
pub fn from_par_iter<I>(iter: I) -> ChunkedArray<BooleanType> where
I: IntoParallelIterator<Item = bool>,
Creates an instance of the collection from the parallel iterator par_iter
. Read more
impl<T> FromTrustedLenIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> FromTrustedLenIterator<Option<<T as PolarsNumericType>::Native>> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<T> where
I: IntoIterator<Item = Option<<T as PolarsNumericType>::Native>>,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<ListType> where
I: IntoIterator<Item = Option<Ptr>>,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoIterator<Item = Option<Ptr>>,
impl<T> FromTrustedLenIterator<Option<T>> for ChunkedArray<ObjectType<T>> where
T: PolarsObject,
impl<T> FromTrustedLenIterator<Option<T>> for ChunkedArray<ObjectType<T>> where
T: PolarsObject,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<ObjectType<T>> where
I: IntoIterator<Item = Option<T>>,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<BooleanType> where
I: IntoIterator<Item = Option<bool>>,
<I as IntoIterator>::IntoIter: TrustedLen,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<ListType> where
I: IntoIterator<Item = Ptr>,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<Utf8Type> where
I: IntoIterator<Item = Ptr>,
pub fn from_iter_trusted_length<I>(iter: I) -> ChunkedArray<BooleanType> where
I: IntoIterator<Item = bool>,
<I as IntoIterator>::IntoIter: TrustedLen,
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
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
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<T> IntoGroupTuples for ChunkedArray<T> where
T: PolarsNumericType,
<T as PolarsNumericType>::Native: NumCast,
impl<T> IntoGroupTuples for ChunkedArray<T> where
T: PolarsNumericType,
<T as PolarsNumericType>::Native: NumCast,
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
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
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
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<Utf8Type> as IntoIterator>::Item> + 'a, Global>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<Utf8Type> as IntoIterator>::Item> + 'a, Global>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<CategoricalType> as IntoIterator>::Item> + 'a, Global>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<CategoricalType> as IntoIterator>::Item> + 'a, Global>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
type Item = Option<<T as PolarsNumericType>::Native>
type Item = Option<<T as PolarsNumericType>::Native>
The type of the elements being iterated over.
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>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<BooleanType> as IntoIterator>::Item> + 'a, Global>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<BooleanType> as IntoIterator>::Item> + 'a, Global>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<ObjectType<T>> as IntoIterator>::Item> + 'a, Global>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<ObjectType<T>> as IntoIterator>::Item> + 'a, Global>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<ListType> as IntoIterator>::Item> + 'a, Global>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<ListType> as IntoIterator>::Item> + 'a, Global>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
type TakeRandom = TakeRandBranch2<BoolTakeRandomSingleChunk<'a>, BoolTakeRandom<'a>>
Create a type that implements TakeRandom
.
type TakeRandom = TakeRandBranch2<ListTakeRandomSingleChunk<'a>, ListTakeRandom<'a>>
Create a type that implements TakeRandom
.
type TakeRandom = TakeRandBranch2<ObjectTakeRandomSingleChunk<'a, T>, ObjectTakeRandom<'a, T>>
pub fn take_rand(
&self
) -> <&'a ChunkedArray<ObjectType<T>> as IntoTakeRandom<'a>>::TakeRandom
pub fn take_rand(
&self
) -> <&'a ChunkedArray<ObjectType<T>> as IntoTakeRandom<'a>>::TakeRandom
Create a type that implements TakeRandom
.
type TakeRandom = TakeRandBranch2<Utf8TakeRandomSingleChunk<'a>, Utf8TakeRandom<'a>>
Create a type that implements TakeRandom
.
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>>
Create a type that implements TakeRandom
.
Check if elements of this array are in the right Series, or List values of the right Series.
Check if elements of this array are in the right Series, or List values of the right Series.
Check if elements of this array are in the right Series, or List values of the right Series.
Check if elements of this array are in the right Series, or List values of the right Series.
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Mul<&'_ ChunkedArray<T>>>::Output
pub fn mul(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Mul<&'_ ChunkedArray<T>>>::Output
Performs the *
operation. Read more
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the *
operator.
impl<'_, 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,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the *
operator.
Create a new ChunkedArray from an iterator.
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<bool>>
) -> ChunkedArray<BooleanType>
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<bool>>
) -> ChunkedArray<BooleanType>
Create a new ChunkedArray from an iterator.
impl<T> NewChunkedArray<ObjectType<T>, T> for ChunkedArray<ObjectType<T>> where
T: PolarsObject,
impl<T> NewChunkedArray<ObjectType<T>, T> for ChunkedArray<ObjectType<T>> where
T: PolarsObject,
Create a new ChunkedArray from an iterator.
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<T>>
) -> ChunkedArray<ObjectType<T>>
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<T>>
) -> ChunkedArray<ObjectType<T>>
Create a new ChunkedArray from an iterator.
impl<T> NewChunkedArray<T, <T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
impl<T> NewChunkedArray<T, <T as PolarsNumericType>::Native> for ChunkedArray<T> where
T: PolarsNumericType,
pub fn new_from_iter(
name: &str,
it: impl Iterator<Item = <T as PolarsNumericType>::Native>
) -> ChunkedArray<T>
pub fn new_from_iter(
name: &str,
it: impl Iterator<Item = <T as PolarsNumericType>::Native>
) -> ChunkedArray<T>
Create a new ChunkedArray from an iterator.
pub fn new_from_opt_slice(
name: &str,
opt_v: &[Option<<T as PolarsNumericType>::Native>]
) -> ChunkedArray<T>
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<<T as PolarsNumericType>::Native>>
) -> ChunkedArray<T>
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<<T as PolarsNumericType>::Native>>
) -> ChunkedArray<T>
Create a new ChunkedArray from an iterator.
Create a new ChunkedArray from an iterator.
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<S>>
) -> ChunkedArray<Utf8Type>
pub fn new_from_opt_iter(
name: &str,
it: impl Iterator<Item = Option<S>>
) -> ChunkedArray<Utf8Type>
Create a new ChunkedArray from an iterator.
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the !
operator.
Performs the unary !
operation. Read more
type Output = ChunkedArray<BooleanType>
type Output = ChunkedArray<BooleanType>
The resulting type after applying the !
operator.
Performs the unary !
operation. Read more
impl<T> NumOpsDispatch for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
impl<T> NumOpsDispatch for ChunkedArray<T> where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
Checked integer division. Computes self / rhs, returning None if rhs == 0 or the division results in overflow.
impl<T> NumOpsDispatchChecked for ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: CheckedDiv,
<T as PolarsNumericType>::Native: CheckedDiv,
<T as PolarsNumericType>::Native: Zero,
<T as PolarsNumericType>::Native: One,
ChunkedArray<T>: IntoSeries,
<<T as PolarsNumericType>::Native as Div<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
<<T as PolarsNumericType>::Native as Div<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
impl<T> NumOpsDispatchChecked for ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: CheckedDiv,
<T as PolarsNumericType>::Native: CheckedDiv,
<T as PolarsNumericType>::Native: Zero,
<T as PolarsNumericType>::Native: One,
ChunkedArray<T>: IntoSeries,
<<T as PolarsNumericType>::Native as Div<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
<<T as PolarsNumericType>::Native as Div<<T as PolarsNumericType>::Native>>::Output == <T as PolarsNumericType>::Native,
Checked integer division. Computes self / rhs, returning None if rhs == 0 or the division results in overflow.
Checked integer division. Computes self / rhs, returning None if rhs == 0 or the division results in overflow.
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Rem<&'_ ChunkedArray<T>>>::Output
pub fn rem(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Rem<&'_ ChunkedArray<T>>>::Output
Performs the %
operation. Read more
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the %
operator.
Performs the %
operation. Read more
impl<'_, 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,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the %
operator.
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the %
operator.
Repeat the values n
times, where n
is determined by the values in by
.
Repeat the values n
times, where n
is determined by the values in by
.
Repeat the values n
times, where n
is determined by the values in by
.
Repeat the values n
times, where n
is determined by the values in by
.
impl<T> StrConcat for ChunkedArray<T> where
T: PolarsNumericType,
<T as PolarsNumericType>::Native: Display,
impl<T> StrConcat for ChunkedArray<T> where
T: PolarsNumericType,
<T as PolarsNumericType>::Native: Display,
Concat the values into a string array. Read more
Concat the values into a string array. Read more
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Sub<&'_ ChunkedArray<T>>>::Output
pub fn sub(
self,
rhs: &'_ ChunkedArray<T>
) -> <&'_ ChunkedArray<T> as Sub<&'_ ChunkedArray<T>>>::Output
Performs the -
operation. Read more
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<'_, T, N> Sub<N> for &'_ ChunkedArray<T> where
T: PolarsNumericType,
N: Num + ToPrimitive,
impl<'_, T, N> Sub<N> for &'_ ChunkedArray<T> where
T: PolarsNumericType,
N: Num + ToPrimitive,
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the -
operator.
type Output = ChunkedArray<T>
type Output = ChunkedArray<T>
The resulting type after applying the -
operator.
type Item = <T as PolarsNumericType>::Native
Get a nullable value by index. Read more
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<&'a ChunkedArray<T> as TakeRandom>::Item>
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<&'a ChunkedArray<T> as TakeRandom>::Item>
Get a value by index and ignore the null bit. Read more
Get a nullable value by index. Read more
pub fn get(
&self,
index: usize
) -> Option<<ChunkedArray<CategoricalType> as TakeRandom>::Item>
pub fn get(
&self,
index: usize
) -> Option<<ChunkedArray<CategoricalType> as TakeRandom>::Item>
Get a nullable value by index. Read more
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<ChunkedArray<CategoricalType> as TakeRandom>::Item>
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<ChunkedArray<CategoricalType> as TakeRandom>::Item>
Get a value by index and ignore the null bit. Read more
pub fn get(
&self,
index: usize
) -> Option<<&'a ChunkedArray<ObjectType<T>> as TakeRandom>::Item>
pub fn get(
&self,
index: usize
) -> Option<<&'a ChunkedArray<ObjectType<T>> as TakeRandom>::Item>
Get a nullable value by index. Read more
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<&'a ChunkedArray<ObjectType<T>> as TakeRandom>::Item>
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<&'a ChunkedArray<ObjectType<T>> as TakeRandom>::Item>
Get a value by index and ignore the null bit. Read more
Get a nullable value by index. Read more
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<ChunkedArray<ListType> as TakeRandom>::Item>
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<ChunkedArray<ListType> as TakeRandom>::Item>
Get a value by index and ignore the null bit. Read more
type Item = <T as PolarsNumericType>::Native
Get a nullable value by index. Read more
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<ChunkedArray<T> as TakeRandom>::Item>
pub unsafe fn get_unchecked(
&self,
index: usize
) -> Option<<ChunkedArray<T> as TakeRandom>::Item>
Get a value by index and ignore the null bit. Read more
pub fn get(
self,
index: usize
) -> Option<<&'a ChunkedArray<Utf8Type> as TakeRandomUtf8>::Item>
pub fn get(
self,
index: usize
) -> Option<<&'a ChunkedArray<Utf8Type> as TakeRandomUtf8>::Item>
Get a nullable value by index. Read more
pub unsafe fn get_unchecked(
self,
index: usize
) -> Option<<&'a ChunkedArray<Utf8Type> as TakeRandomUtf8>::Item>
pub unsafe fn get_unchecked(
self,
index: usize
) -> Option<<&'a ChunkedArray<Utf8Type> as TakeRandomUtf8>::Item>
Get a value by index and ignore the null bit. Read more
impl<T> ToDummies<T> for ChunkedArray<T> where
T: PolarsIntegerType + Sync,
<T as PolarsNumericType>::Native: Hash,
<T as PolarsNumericType>::Native: Eq,
ChunkedArray<T>: ChunkOps,
ChunkedArray<T>: ChunkCompare<<T as PolarsNumericType>::Native>,
ChunkedArray<T>: ChunkUnique<T>,
impl<T> ToDummies<T> for ChunkedArray<T> where
T: PolarsIntegerType + Sync,
<T as PolarsNumericType>::Native: Hash,
<T as PolarsNumericType>::Native: Eq,
ChunkedArray<T>: ChunkOps,
ChunkedArray<T>: ChunkCompare<<T as PolarsNumericType>::Native>,
ChunkedArray<T>: ChunkUnique<T>,
Useful for a Utf8 or a List to get underlying value size. During a rechunk this is handy Read more
Useful for a Utf8 or a List to get underlying value size. During a rechunk this is handy Read more
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
impl<T> VarAggSeries for ChunkedArray<T> where
T: PolarsIntegerType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
impl<T> VarAggSeries for ChunkedArray<T> where
T: PolarsIntegerType,
<<T as PolarsNumericType>::Native as Simd>::Simd: Add<<<T as PolarsNumericType>::Native as Simd>::Simd>,
<<T as PolarsNumericType>::Native as Simd>::Simd: Sum<<T as PolarsNumericType>::Native>,
<<T as PolarsNumericType>::Native as Simd>::Simd: SimdOrd<<T as PolarsNumericType>::Native>,
<<<T as PolarsNumericType>::Native as Simd>::Simd as Add<<<T as PolarsNumericType>::Native as Simd>::Simd>>::Output == <<T as PolarsNumericType>::Native as Simd>::Simd,
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
Get the variance of the ChunkedArray as a new Series of length 1.
Get the standard deviation of the ChunkedArray as a new Series of length 1.
impl<T> VecHash for ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: Hash,
<T as PolarsNumericType>::Native: CallHasher,
impl<T> VecHash for ChunkedArray<T> where
T: PolarsIntegerType,
<T as PolarsNumericType>::Native: Hash,
<T as PolarsNumericType>::Native: CallHasher,
impl<T> ZipOuterJoinColumn for ChunkedArray<T> where
T: PolarsIntegerType,
ChunkedArray<T>: IntoSeries,
impl<T> ZipOuterJoinColumn for ChunkedArray<T> where
T: PolarsIntegerType,
ChunkedArray<T>: IntoSeries,
Auto Trait Implementations
impl<T> !RefUnwindSafe for ChunkedArray<T>
impl<T> Send for ChunkedArray<T> where
T: Send,
impl<T> Sync for ChunkedArray<T> where
T: Sync,
impl<T> Unpin for ChunkedArray<T> where
T: Unpin,
impl<T> !UnwindSafe for ChunkedArray<T>
Blanket Implementations
Mutably borrows from an owned value. Read more