Enum polars_core::prelude::RevMapping  
source · pub enum RevMapping {
    Global(PlHashMap<u32, u32>, Utf8ViewArray, u32),
    Local(Utf8ViewArray, u128),
}Available on crate feature 
dtype-categorical only.Variants§
Global(PlHashMap<u32, u32>, Utf8ViewArray, u32)
Hashmap: maps the indexes from the global cache/categorical array to indexes in the local Utf8Array Utf8Array: caches the string values
Local(Utf8ViewArray, u128)
Utf8Array: caches the string values and a hash of all values for quick comparison
Implementations§
source§impl RevMapping
 
impl RevMapping
pub fn is_global(&self) -> bool
pub fn is_local(&self) -> bool
sourcepub fn get_categories(&self) -> &Utf8ViewArray
 
pub fn get_categories(&self) -> &Utf8ViewArray
Get the categories in this RevMapping
pub fn build_local(categories: Utf8ViewArray) -> Self
sourcepub fn len(&self) -> usize
 
pub fn len(&self) -> usize
Get the length of the RevMapping
pub fn get_optional(&self, idx: u32) -> Option<&str>
Trait Implementations§
source§impl Clone for RevMapping
 
impl Clone for RevMapping
source§fn clone(&self) -> RevMapping
 
fn clone(&self) -> RevMapping
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for RevMapping
 
impl Debug for RevMapping
Auto Trait Implementations§
impl !Freeze for RevMapping
impl RefUnwindSafe for RevMapping
impl Send for RevMapping
impl Sync for RevMapping
impl Unpin for RevMapping
impl UnwindSafe for RevMapping
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more