pub struct SeriesBuilder { /* private fields */ }
Expand description
A type-erased wrapper around ArrayBuilder.
Implementations§
Source§impl SeriesBuilder
impl SeriesBuilder
pub fn new(dtype: DataType) -> SeriesBuilder
pub fn reserve(&mut self, additional: usize)
pub fn freeze(self, name: PlSmallStr) -> Series
pub fn freeze_reset(&mut self, name: PlSmallStr) -> Series
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn extend(&mut self, other: &Series, share: ShareStrategy)
pub fn extend(&mut self, other: &Series, share: ShareStrategy)
Extends this builder with the contents of the given series. May panic if other does not match the dtype of this builder.
Sourcepub fn subslice_extend(
&mut self,
other: &Series,
start: usize,
length: usize,
share: ShareStrategy,
)
pub fn subslice_extend( &mut self, other: &Series, start: usize, length: usize, share: ShareStrategy, )
Extends this builder with the contents of the given series subslice. May panic if other does not match the dtype of this builder.
pub fn subslice_extend_repeated( &mut self, other: &Series, start: usize, length: usize, repeats: usize, share: ShareStrategy, )
Sourcepub unsafe fn gather_extend(
&mut self,
other: &Series,
idxs: &[u32],
share: ShareStrategy,
)
pub unsafe fn gather_extend( &mut self, other: &Series, idxs: &[u32], share: ShareStrategy, )
Extends this builder with the contents of the given series at the given
indices. That is, other[idxs[i]]
is appended to this builder in order,
for each i=0..idxs.len(). May panic if other does not match the dtype
of this builder, or if the other series is not rechunked.
§Safety
The indices must be in-bounds.
pub fn opt_gather_extend( &mut self, other: &Series, idxs: &[u32], share: ShareStrategy, )
Auto Trait Implementations§
impl Freeze for SeriesBuilder
impl !RefUnwindSafe for SeriesBuilder
impl Send for SeriesBuilder
impl !Sync for SeriesBuilder
impl Unpin for SeriesBuilder
impl !UnwindSafe for SeriesBuilder
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