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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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