pub struct CategoricalToArrowConverter {
pub converters: IndexMap<usize, CategoricalArrayToArrowConverter, RandomState>,
pub persist_remap: bool,
}Available on crate feature
dtype-categorical only.Expand description
Categorical converter that prunes unused categories.
Fields§
§converters: IndexMap<usize, CategoricalArrayToArrowConverter, RandomState>Converters keyed by the Arc address of Arc<CategoricalMapping>.
§Safety
The usize key remains valid as CategoricalArrayToArrowConverter holds a ref-count to the
Arc<> that the key is derived from.
persist_remap: boolPersist the key remap to ensure consistent mapping across multiple calls.
Implementations§
Source§impl CategoricalToArrowConverter
impl CategoricalToArrowConverter
Sourcepub fn initialize(&mut self, dtype: &DataType)
pub fn initialize(&mut self, dtype: &DataType)
Initializes categorical converters for all categorical mappings present in this dtype.
Auto Trait Implementations§
impl Freeze for CategoricalToArrowConverter
impl !RefUnwindSafe for CategoricalToArrowConverter
impl Send for CategoricalToArrowConverter
impl Sync for CategoricalToArrowConverter
impl Unpin for CategoricalToArrowConverter
impl UnsafeUnpin for CategoricalToArrowConverter
impl !UnwindSafe for CategoricalToArrowConverter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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