Trait polars_core::chunked_array::ops::TakeRandom[][src]

pub trait TakeRandom {
    type Item;
    fn get(&self, index: usize) -> Option<Self::Item>;
unsafe fn get_unchecked(&self, index: usize) -> Self::Item; }
Expand description

Random access

Associated Types

Required methods

fn get(&self, index: usize) -> Option<Self::Item>[src]

Get a nullable value by index.

Safety

Out of bounds access doesn’t Error but will return a Null value

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

Get a value by index and ignore the null bit.

Safety

This doesn’t check if the underlying type is null or not and may return an uninitialized value.

Implementors

impl TakeRandom for BooleanChunked[src]

type Item = bool

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

impl TakeRandom for CategoricalChunked[src]

type Item = u32

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

impl TakeRandom for ListChunked[src]

type Item = Series

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

impl<'a> TakeRandom for &'a Utf8Chunked[src]

type Item = &'a str

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

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

type Item = T::Native

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

impl<'a, T> TakeRandom for NumTakeRandomChunked<'a, T> where
    T: PolarsNumericType
[src]

type Item = T::Native

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

impl<'a, T> TakeRandom for NumTakeRandomCont<'a, T> where
    T: Copy
[src]

type Item = T

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

impl<'a, T: PolarsObject> TakeRandom for &'a ObjectChunked<T>[src]

type Item = &'a T

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]

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

type Item = T::Native

fn get(&self, index: usize) -> Option<Self::Item>[src]

unsafe fn get_unchecked(&self, index: usize) -> Self::Item[src]