pub struct StringColumn { /* private fields */ }Expand description
A column of text values (pond-ts kind: 'string'). A gap is an Arrow
null; an empty string is a value, not a gap.
Held as an Arrow Utf8 array, or as a dictionary (Dictionary<Int32, Utf8>: each row an index into a list of distinct strings) when it was
read that way from Arrow. Reading gives the same values either way;
StringColumn::is_dictionary says which, and to_arrow writes it back
the same way. Two columns are equal when they hold the same values,
however each is held.
Implementations§
Source§impl StringColumn
impl StringColumn
Sourcepub fn from_options<S: AsRef<str>>(
values: impl IntoIterator<Item = Option<S>>,
) -> Self
pub fn from_options<S: AsRef<str>>( values: impl IntoIterator<Item = Option<S>>, ) -> Self
Build from optional values; None is a gap.
Sourcepub fn get(&self, i: usize) -> Option<&str>
pub fn get(&self, i: usize) -> Option<&str>
The value at i, or None for a gap. Panics if i is out of range.
Sourcepub fn missing_count(&self) -> usize
pub fn missing_count(&self) -> usize
Number of gaps.
Sourcepub fn is_dictionary(&self) -> bool
pub fn is_dictionary(&self) -> bool
True when held as a dictionary (see the type’s notes).
Trait Implementations§
Source§impl Clone for StringColumn
impl Clone for StringColumn
Source§impl Debug for StringColumn
impl Debug for StringColumn
Source§impl From<StringColumn> for ColumnData
impl From<StringColumn> for ColumnData
Source§fn from(c: StringColumn) -> Self
fn from(c: StringColumn) -> Self
Converts to this type from the input type.
Source§impl From<StringColumn> for Labels
impl From<StringColumn> for Labels
Source§fn from(c: StringColumn) -> Self
fn from(c: StringColumn) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for StringColumn
impl !UnwindSafe for StringColumn
impl Freeze for StringColumn
impl Send for StringColumn
impl Sync for StringColumn
impl Unpin for StringColumn
impl UnsafeUnpin for StringColumn
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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