[][src]Struct polars::chunked_array::ChunkedArray

pub struct ChunkedArray<T> { /* fields omitted */ }

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 te same type T. Below we use an apply to use the cosine function to the values of a ChunkedArray.

fn apply_cosine(ca: &Float32Chunked) -> Float32Chunked {
    ca.apply(|v| v.cos())
}

If we would like to cast the result we could use a Rust Iterator instead of an apply method. Note that Iterators are slightly slower as the null values aren't ignored implicitly.

fn apply_cosine_and_cast(ca: &Float32Chunked) -> Float64Chunked {
    ca.into_iter()
        .map(|opt_v| {
        opt_v.map(|v| v.cos() as f64)
    }).collect()
}

Another option is to first cast and then use an apply.

fn apply_cosine_and_cast(ca: &Float32Chunked) -> Float64Chunked {
    ca.cast::<Float64Type>()
        .unwrap()
        .apply(|v| v.cos())
}

Conversion between Series and ChunkedArray's

Conversion from a Series to a ChunkedArray is effortless.

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

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

Iterators

ChunkedArrays fully support Rust native Iterator and DoubleEndedIterator traits, thereby giving access to all the excelent 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 mutliple 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 adviced to call the rechunk after multiple append operations.

Implementations

impl ChunkedArray<BooleanType>[src]

pub fn arg_true(&self) -> UInt32Chunked[src]

impl ChunkedArray<BooleanType>[src]

pub fn all_true(&self) -> bool[src]

impl ChunkedArray<BooleanType>[src]

pub fn all_false(&self) -> bool[src]

impl<T> ChunkedArray<T> where
    T: PolarsNumericType
[src]

pub fn to_ndarray(&self) -> Result<ArrayView1<'_, T::Native>>[src]

This is supported on crate feature ndarray only.

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

impl ChunkedArray<ListType>[src]

pub fn to_ndarray<N>(&self) -> Result<Array2<N::Native>> where
    N: PolarsNumericType
[src]

This is supported on crate feature ndarray only.

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

impl<T> ChunkedArray<ObjectType<T>> where
    T: Any + Debug + Clone + Send + Sync + Default
[src]

pub fn new_from_vec(name: &str, v: Vec<T>) -> Self[src]

This is supported on crate feature object only.

impl<T> ChunkedArray<ObjectType<T>> where
    T: Any + Debug + Clone + Send + Sync + Default
[src]

pub fn get_as_any(&self, index: usize) -> &dyn Any[src]

This is supported on crate feature object only.

impl<T> ChunkedArray<T> where
    ChunkedArray<T>: ChunkTake
[src]

pub fn sample_n(&self, n: usize, with_replacement: bool) -> Result<Self>[src]

This is supported on crate feature random only.

Sample n datapoints from this ChunkedArray.

pub fn sample_frac(&self, frac: f64, with_replacement: bool) -> Result<Self>[src]

This is supported on crate feature random only.

Sample a fraction between 0.0-1.0 of this ChunkedArray.

impl<T> ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Float + NumCast
[src]

pub fn rand_normal(
    name: &str,
    length: usize,
    mean: f64,
    std_dev: f64
) -> Result<Self>
[src]

This is supported on crate feature random only.

Create ChunkedArray with samples from a Normal distribution.

pub fn rand_standard_normal(name: &str, length: usize) -> Self[src]

This is supported on crate feature random only.

Create ChunkedArray with samples from a Standard Normal distribution.

pub fn rand_uniform(name: &str, length: usize, low: f64, high: f64) -> Self[src]

This is supported on crate feature random only.

Create ChunkedArray with samples from a Uniform distribution.

impl ChunkedArray<BooleanType>[src]

pub fn rand_bernoulli(name: &str, length: usize, p: f64) -> Result<Self>[src]

This is supported on crate feature random only.

Create ChunkedArray with samples from a Bernoulli distribution.

impl ChunkedArray<Utf8Type>[src]

pub fn str_lengths(&self) -> UInt32Chunked[src]

This is supported on crate feature strings only.

Get the length of the string values.

pub fn contains(&self, pat: &str) -> Result<BooleanChunked>[src]

This is supported on crate feature strings only.

Check if strings contain a regex pattern

pub fn replace(&self, pat: &str, val: &str) -> Result<Utf8Chunked>[src]

This is supported on crate feature strings only.

Replace the leftmost (sub)string by a regex pattern

pub fn replace_all(&self, pat: &str, val: &str) -> Result<Utf8Chunked>[src]

This is supported on crate feature strings only.

Replace all (sub)strings by a regex pattern

pub fn to_lowercase(&self) -> Utf8Chunked[src]

This is supported on crate feature strings only.

Modify the strings to their lowercase equivalent

pub fn to_uppercase(&self) -> Utf8Chunked[src]

This is supported on crate feature strings only.

Modify the strings to their uppercase equivalent

pub fn concat(&self, other: &Utf8Chunked) -> Self[src]

This is supported on crate feature strings only.

Concat with the values from a second Utf8Chunked

impl ChunkedArray<Utf8Type>[src]

pub fn as_date32(&self, fmt: Option<&str>) -> Result<Date32Chunked>[src]

This is supported on crate feature temporal only.

pub fn as_date64(&self, fmt: Option<&str>) -> Result<Date64Chunked>[src]

This is supported on crate feature temporal only.

impl ChunkedArray<Date64Type>[src]

pub fn year(&self) -> Int32Chunked[src]

This is supported on crate feature temporal only.

Extract month from underlying NaiveDateTime representation. Returns the year number in the calendar date.

pub fn month(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.

The return value ranges from 1 to 12.

pub fn day(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract day from underlying NaiveDateTime representation. Returns the day of month starting from 1.

The return value ranges from 1 to 31. (The last day of month differs by months.)

pub fn hour(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.

pub fn minute(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.

pub fn second(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.

pub fn nanosecond(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract second from underlying NaiveDateTime representation. Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second.

pub fn ordinal(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Returns the day of year starting from 1.

The return value ranges from 1 to 366. (The last day of year differs by years.)

impl ChunkedArray<Date32Type>[src]

pub fn year(&self) -> Int32Chunked[src]

This is supported on crate feature temporal only.

Extract month from underlying NaiveDateTime representation. Returns the year number in the calendar date.

pub fn month(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.

The return value ranges from 1 to 12.

pub fn day(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Extract day from underlying NaiveDateTime representation. Returns the day of month starting from 1.

The return value ranges from 1 to 31. (The last day of month differs by months.)

pub fn ordinal(&self) -> UInt32Chunked[src]

This is supported on crate feature temporal only.

Returns the day of year starting from 1.

The return value ranges from 1 to 366. (The last day of year differs by years.)

impl<T> ChunkedArray<T>[src]

pub fn array_data(&self) -> Vec<ArrayDataRef>[src]

Get Arrow ArrayData

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

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

pub fn null_bits(&self) -> Vec<(usize, Option<Buffer>)>[src]

Get the null count and the buffer of bits representing null values

pub fn unpack_series_matching_type(
    &self,
    series: &Series
) -> Result<&ChunkedArray<T>>
[src]

Series to ChunkedArray

pub fn len(&self) -> usize[src]

Combined length of all the chunks.

pub fn is_empty(&self) -> bool[src]

Check if ChunkedArray is empty.

pub fn chunk_id(&self) -> &Vec<usize>[src]

Unique id representing the number of chunks

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

A reference to the chunks

pub fn is_optimal_aligned(&self) -> bool[src]

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

pub fn null_count(&self) -> usize[src]

Count the null values.

pub fn limit(&self, num_elements: usize) -> Result<Self>[src]

Take a view of top n elements

pub fn append_array(&mut self, other: ArrayRef) -> Result<()>[src]

Append arrow array in place.

let mut array = Int32Chunked::new_from_slice("array", &[1, 2]);
let array_2 = Int32Chunked::new_from_slice("2nd", &[3]);

array.append(&array_2);
assert_eq!(Vec::from(&array), [Some(1), Some(2), Some(3)])

pub fn slice(&self, offset: usize, length: usize) -> Result<Self>[src]

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

pub fn is_null(&self) -> BooleanChunked[src]

Get a mask of the null values.

pub fn is_not_null(&self) -> BooleanChunked[src]

Get a mask of the null values.

pub fn dtype(&self) -> &ArrowDataType[src]

Get data type of ChunkedArray.

pub fn head(&self, length: Option<usize>) -> Self[src]

Get the head of the ChunkedArray

pub fn tail(&self, length: Option<usize>) -> Self[src]

Get the tail of the ChunkedArray

pub fn append(&mut self, other: &Self) where
    Self: Sized
[src]

Append in place.

pub fn name(&self) -> &str[src]

Name of the ChunkedArray.

pub fn ref_field(&self) -> &Field[src]

Get a reference to the field.

pub fn rename(&mut self, name: &str)[src]

Rename this ChunkedArray.

impl<T> ChunkedArray<T> where
    T: PolarsDataType
[src]

pub fn new_from_chunks(name: &str, chunks: Vec<ArrayRef>) -> Self[src]

Create a new ChunkedArray from existing chunks.

impl<T> ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

pub fn new_from_aligned_vec(name: &str, v: AlignedVec<T::Native>) -> Self[src]

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

pub fn new_with_null_bitmap(
    name: &str,
    values: &[T::Native],
    buffer: Option<Buffer>,
    null_count: usize
) -> Self
[src]

Nullify values in slice with an existing null bitmap

pub fn new_from_owned_with_null_bitmap(
    name: &str,
    values: AlignedVec<T::Native>,
    buffer: Option<Buffer>,
    null_count: usize
) -> Self
[src]

Nullify values in slice with an existing null bitmap

impl<T> ChunkedArray<T> where
    T: PolarsNumericType
[src]

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

Contiguous slice

pub fn data_views(&self) -> Vec<&[T::Native]>[src]

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

pub fn map<B, F>(&self, f: F) -> Result<Map<Copied<Iter<'_, T::Native>>, F>> where
    F: Fn(T::Native) -> B, 
[src]

If cont_slice is successful a closure is mapped over the elements.

Example

use polars::prelude::*;
fn multiply(ca: &UInt32Chunked) -> Result<Series> {
    let mapped = ca.map(|v| v * 2)?;
    Ok(mapped.collect())
}

pub fn map_null_checks<'a, B, F>(
    &'a self,
    f: F
) -> Map<Box<dyn PolarsIterator<Item = Option<T::Native>> + 'a>, F> where
    F: Fn(Option<T::Native>) -> B, 
[src]

If cont_slice fails we can fallback on an iterator with null checks and map a closure over the elements.

Example

use polars::prelude::*;
use itertools::Itertools;
fn multiply(ca: &UInt32Chunked) -> Series {
    let mapped_result = ca.map(|v| v * 2);

    if let Ok(mapped) = mapped_result {
        mapped.collect()
    } else {
        ca
        .map_null_checks(|opt_v| opt_v.map(|v |v * 2)).collect()
    }
}

pub fn fold<F, B>(&self, init: B, f: F) -> Result<B> where
    F: Fn(B, T::Native) -> B, 
[src]

If cont_slice is successful a closure can be applied as aggregation

Example

use polars::prelude::*;
fn compute_sum(ca: &UInt32Chunked) -> Result<u32> {
    ca.fold(0, |acc, value| acc + value)
}

pub fn fold_null_checks<F, B>(&self, init: B, f: F) -> B where
    F: Fn(B, Option<T::Native>) -> B, 
[src]

If cont_slice fails we can fallback on an iterator with null checks and a closure for aggregation

Example

use polars::prelude::*;
fn compute_sum(ca: &UInt32Chunked) -> u32 {
    match ca.fold(0, |acc, value| acc + value) {
        // faster sum without null checks was successful
        Ok(sum) => sum,
        // Null values or multiple chunks in ChunkedArray, we need to do more bounds checking
        Err(_) => ca.fold_null_checks(0, |acc, opt_value| {
            match opt_value {
                Some(v) => acc + v,
                None => acc
            }
        })
    }
}

impl ChunkedArray<ListType>[src]

pub fn explode(&self) -> Result<(Series, Vec<usize>)>[src]

Trait Implementations

impl<T> Add<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero
[src]

type Output = ChunkedArray<T>

The resulting type after applying the + operator.

impl Add<&'_ ChunkedArray<Utf8Type>> for &Utf8Chunked[src]

type Output = Utf8Chunked

The resulting type after applying the + operator.

impl<T> Add<ChunkedArray<T>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero
[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<ChunkedArray<Utf8Type>> for Utf8Chunked[src]

type Output = Utf8Chunked

The resulting type after applying the + operator.

impl<T, N> Add<N> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast,
    N: Num + ToPrimitive,
    T::Native: Add<Output = T::Native>, 
[src]

type Output = ChunkedArray<T>

The resulting type after applying the + operator.

impl<T> AsRef<ChunkedArray<T>> for ChunkedArray<T>[src]

impl<'a, T> AsRef<ChunkedArray<T>> for dyn SeriesTrait + 'a where
    T: 'static + PolarsDataType
[src]

impl BitAnd<&'_ ChunkedArray<BooleanType>> for &BooleanChunked[src]

type Output = BooleanChunked

The resulting type after applying the & operator.

impl BitAnd<ChunkedArray<BooleanType>> for BooleanChunked[src]

type Output = BooleanChunked

The resulting type after applying the & operator.

impl BitOr<&'_ ChunkedArray<BooleanType>> for &BooleanChunked[src]

type Output = BooleanChunked

The resulting type after applying the | operator.

impl BitOr<ChunkedArray<BooleanType>> for BooleanChunked[src]

type Output = BooleanChunked

The resulting type after applying the | operator.

impl<T> ChunkAgg<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: PartialOrd + Num + NumCast
[src]

impl<'a, T> ChunkApply<'a, <T as ArrowPrimitiveType>::Native, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsNumericType
[src]

pub fn apply<F>(&'a self, f: F) -> Self where
    F: Fn(T::Native) -> T::Native + Copy
[src]

Chooses the fastest path for closure application. Null values remain null.

Example

use polars::prelude::*;
fn double(ca: &UInt32Chunked) -> UInt32Chunked {
    ca.apply(|v| v * 2)
}

impl<T> ChunkApplyKernel<PrimitiveArray<T>> for ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

impl<T> ChunkCast for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast
[src]

impl ChunkCompare<&'_ ChunkedArray<BooleanType>> for BooleanChunked[src]

impl ChunkCompare<&'_ ChunkedArray<ListType>> for ListChunked[src]

impl<T> ChunkCompare<&'_ ChunkedArray<T>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast + NumComp + ToPrimitive
[src]

impl ChunkCompare<&'_ ChunkedArray<Utf8Type>> for Utf8Chunked[src]

impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast,
    Rhs: NumComp + ToPrimitive
[src]

impl<T> ChunkExpandAtIndex<T> for ChunkedArray<T> where
    ChunkedArray<T>: ChunkFull<T::Native> + TakeRandom<Item = T::Native>,
    T: PolarsPrimitiveType
[src]

impl<T> ChunkFillNone for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + PartialOrd + Div<Output = T::Native> + Num + NumCast
[src]

impl<T> ChunkFillNoneValue<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + PartialOrd + Div<Output = T::Native> + Num + NumCast
[src]

impl<T> ChunkFilter<T> for ChunkedArray<T> where
    T: PolarsNumericType,
    ChunkedArray<T>: ChunkOps
[src]

impl<T> ChunkFull<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

impl<T> ChunkIntegerDecode for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: IntegerDecode
[src]

impl<T> ChunkOps for ChunkedArray<T> where
    T: PolarsNumericType
[src]

impl<T> ChunkReverse<T> for ChunkedArray<T> where
    T: PolarsNumericType,
    ChunkedArray<T>: ChunkOps
[src]

impl<'a, T> ChunkSet<'a, <T as ArrowPrimitiveType>::Native, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsNumericType
[src]

impl<T> ChunkShift<T> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Copy
[src]

impl<T> ChunkShiftFill<T, Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Copy
[src]

impl<T> ChunkSort<T> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: PartialOrd
[src]

impl<T> ChunkTake for ChunkedArray<T> where
    T: PolarsNumericType
[src]

impl<T> ChunkUnique<T> for ChunkedArray<T> where
    T: PolarsIntegerType,
    T::Native: Hash + Eq,
    ChunkedArray<T>: ChunkOps + IntoSeries
[src]

impl<T> ChunkVar<f64> for ChunkedArray<T> where
    T: PolarsIntegerType,
    T::Native: PartialOrd + Num + NumCast
[src]

impl<T> ChunkWindow for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Zero + Bounded + NumCast + Div<Output = T::Native> + Mul<Output = T::Native> + PartialOrd + Copy
[src]

impl<T> ChunkWindowCustom<<T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Zero + Bounded + NumCast + Div<Output = T::Native> + Mul<Output = T::Native> + PartialOrd + Copy
[src]

impl<T> ChunkZip<T> for ChunkedArray<T> where
    T: PolarsNumericType
[src]

impl<T> Clone for ChunkedArray<T>[src]

impl<T> CompToSeries for ChunkedArray<T> where
    T: PolarsSingleType,
    ChunkedArray<T>: IntoSeries
[src]

impl<T> Debug for ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

impl<T> Default for ChunkedArray<T>[src]

impl<T> Div<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + One
[src]

type Output = ChunkedArray<T>

The resulting type after applying the / operator.

impl<T> Div<ChunkedArray<T>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + One
[src]

type Output = Self

The resulting type after applying the / operator.

impl<T, N> Div<N> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast,
    N: Num + ToPrimitive,
    T::Native: Div<Output = T::Native>, 
[src]

type Output = ChunkedArray<T>

The resulting type after applying the / operator.

impl<T> Downcast<PrimitiveArray<T>> for ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

impl<'a> From<&'a ChunkedArray<BooleanType>> for Vec<Option<bool>>[src]

impl<'a, T> From<&'a ChunkedArray<T>> for Vec<Option<T::Native>> where
    T: PolarsNumericType,
    &'a ChunkedArray<T>: IntoIterator<Item = Option<T::Native>>,
    ChunkedArray<T>: ChunkOps
[src]

impl<'a> From<&'a ChunkedArray<Utf8Type>> for Vec<Option<&'a str>>[src]

From trait

impl From<ChunkedArray<BooleanType>> for Vec<Option<bool>>[src]

impl<T> From<ChunkedArray<T>> for Series where
    T: PolarsDataType,
    ChunkedArray<T>: IntoSeries
[src]

impl From<ChunkedArray<Utf8Type>> for Vec<Option<String>>[src]

impl<T> FromIterator<(AlignedVec<<T as ArrowPrimitiveType>::Native>, (usize, Option<Buffer>))> for ChunkedArray<T> where
    T: PolarsNumericType
[src]

impl<T> FromIterator<Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

FromIterator trait

impl<T> FromParallelIterator<Option<<T as ArrowPrimitiveType>::Native>> for ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

impl<T> IntoGroupTuples for ChunkedArray<T> where
    T: PolarsIntegerType,
    T::Native: Eq + Hash
[src]

impl<'a, T> IntoIterator for &'a ChunkedArray<T> where
    T: PolarsNumericType
[src]

type Item = Option<T::Native>

The type of the elements being iterated over.

type IntoIter = Box<dyn PolarsIterator<Item = Self::Item> + 'a>

Which kind of iterator are we turning this into?

impl<'a, T> IntoNoNullIterator for &'a ChunkedArray<T> where
    T: PolarsNumericType
[src]

type Item = T::Native

type IntoIter = Box<dyn PolarsIterator<Item = Self::Item> + 'a>

impl<'a, T> IntoTakeRandom<'a> for &'a ChunkedArray<T> where
    T: PolarsNumericType
[src]

type Item = T::Native

type TakeRandom = Box<dyn TakeRandom<Item = Self::Item> + 'a>

impl<T> Mul<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero
[src]

type Output = ChunkedArray<T>

The resulting type after applying the * operator.

impl<T> Mul<ChunkedArray<T>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero
[src]

type Output = Self

The resulting type after applying the * operator.

impl<T, N> Mul<N> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast,
    N: Num + ToPrimitive,
    T::Native: Mul<Output = T::Native>, 
[src]

type Output = ChunkedArray<T>

The resulting type after applying the * operator.

impl<T> NewChunkedArray<T, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsPrimitiveType
[src]

pub fn new_from_iter(
    name: &str,
    it: impl Iterator<Item = T::Native>
) -> ChunkedArray<T>
[src]

Create a new ChunkedArray from an iterator.

impl<T> NumOpsDispatch for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Rem<Output = T::Native> + Zero + One,
    ChunkedArray<T>: IntoSeries
[src]

impl<T> Pow for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: ToPrimitive
[src]

impl<T> Rem<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Rem<Output = T::Native>, 
[src]

type Output = ChunkedArray<T>

The resulting type after applying the % operator.

impl<T> Rem<ChunkedArray<T>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Rem<Output = T::Native>, 
[src]

type Output = ChunkedArray<T>

The resulting type after applying the % operator.

impl<T, N> Rem<N> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast,
    N: Num + ToPrimitive,
    T::Native: Rem<Output = T::Native>, 
[src]

type Output = ChunkedArray<T>

The resulting type after applying the % operator.

impl<T> Sub<&'_ ChunkedArray<T>> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero
[src]

type Output = ChunkedArray<T>

The resulting type after applying the - operator.

impl<T> Sub<ChunkedArray<T>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero
[src]

type Output = Self

The resulting type after applying the - operator.

impl<T, N> Sub<N> for &ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast,
    N: Num + ToPrimitive,
    T::Native: Sub<Output = T::Native>, 
[src]

type Output = ChunkedArray<T>

The resulting type after applying the - operator.

impl<T> TakeRandom for ChunkedArray<T> where
    T: ArrowPrimitiveType
[src]

type Item = T::Native

impl<'a, T> TakeRandom for &'a ChunkedArray<T> where
    T: ArrowPrimitiveType
[src]

type Item = T::Native

impl<T> ToDummies<T> for ChunkedArray<T> where
    T: PolarsIntegerType + Sync,
    T::Native: Hash + Eq + Display,
    ChunkedArray<T>: ChunkOps + ChunkCompare<T::Native> + ChunkUnique<T>, 
[src]

impl<T> ZipOuterJoinColumn for ChunkedArray<T> where
    T: PolarsIntegerType,
    ChunkedArray<T>: IntoSeries
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for ChunkedArray<T>[src]

impl<T> Send for ChunkedArray<T> where
    T: Send
[src]

impl<T> Sync for ChunkedArray<T> where
    T: Sync
[src]

impl<T> Unpin for ChunkedArray<T> where
    T: Unpin
[src]

impl<T> !UnwindSafe for ChunkedArray<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> From<T> for T[src]

impl<T> FromCast<T> for T

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'data, I> IntoParallelRefIterator<'data> for I where
    I: 'data + ?Sized,
    &'data I: IntoParallelIterator
[src]

type Iter = <&'data I as IntoParallelIterator>::Iter

The type of the parallel iterator that will be returned.

type Item = <&'data I as IntoParallelIterator>::Item

The type of item that the parallel iterator will produce. This will typically be an &'data T reference type. Read more

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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