pub struct ObjectChunkedBuilder<T> { /* private fields */ }
Available on crate feature
object
only.Implementations§
Source§impl<T> ObjectChunkedBuilder<T>where
T: PolarsObject,
impl<T> ObjectChunkedBuilder<T>where
T: PolarsObject,
pub fn field(&self) -> &Field
pub fn new(name: PlSmallStr, capacity: usize) -> ObjectChunkedBuilder<T>
Sourcepub fn append_value(&mut self, v: T)
pub fn append_value(&mut self, v: T)
Appends a value of type T
into the builder
Sourcepub fn append_null(&mut self)
pub fn append_null(&mut self)
Appends a null slot into the builder
pub fn append_value_from_any( &mut self, v: &(dyn Any + 'static), ) -> Result<(), PolarsError>
pub fn append_option(&mut self, opt: Option<T>)
pub fn finish(self) -> ChunkedArray<ObjectType<T>>
Trait Implementations§
Source§impl<T> AnonymousObjectBuilder for ObjectChunkedBuilder<T>where
T: PolarsObject,
impl<T> AnonymousObjectBuilder for ObjectChunkedBuilder<T>where
T: PolarsObject,
Source§unsafe fn from_chunks(
self: Box<ObjectChunkedBuilder<T>>,
chunks: Vec<Box<dyn Array>>,
) -> Series
unsafe fn from_chunks( self: Box<ObjectChunkedBuilder<T>>, chunks: Vec<Box<dyn Array>>, ) -> Series
§Safety
Expects ObjectArray<T>
arrays.
fn as_array_builder(self: Box<ObjectChunkedBuilder<T>>) -> Box<dyn ArrayBuilder>
Source§fn append_null(&mut self)
fn append_null(&mut self)
Append a
null
value.Source§fn append_value(&mut self, value: &(dyn Any + 'static))
fn append_value(&mut self, value: &(dyn Any + 'static))
Source§fn to_series(&mut self) -> Series
fn to_series(&mut self) -> Series
Take the current state and materialize as a
Series
the builder should not be used after that.fn get_list_builder( &self, name: PlSmallStr, values_capacity: usize, list_capacity: usize, ) -> Box<dyn ListBuilderTrait>
fn append_option(&mut self, value: Option<&(dyn Any + 'static)>)
Source§impl<T> ArrayBuilder for ObjectChunkedBuilder<T>where
T: PolarsObject,
impl<T> ArrayBuilder for ObjectChunkedBuilder<T>where
T: PolarsObject,
fn dtype(&self) -> &ArrowDataType
fn reserve(&mut self, additional: usize)
Source§fn freeze_reset(&mut self) -> Box<dyn Array>
fn freeze_reset(&mut self) -> Box<dyn Array>
Return the built array and reset to an empty state.
Source§fn extend_nulls(&mut self, length: usize)
fn extend_nulls(&mut self, length: usize)
Extend this builder with the given number of null elements.
Source§fn subslice_extend(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
_share: ShareStrategy,
)
fn subslice_extend( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, _share: ShareStrategy, )
Extends this builder with the contents of the given array subslice. May
panic if other does not match the dtype of this array.
Source§fn subslice_extend_repeated(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_repeated( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats the extension
repeats
times.Source§unsafe fn gather_extend(
&mut self,
other: &(dyn Array + 'static),
idxs: &[u32],
_share: ShareStrategy,
)
unsafe fn gather_extend( &mut self, other: &(dyn Array + 'static), idxs: &[u32], _share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]]
is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Read moreSource§fn opt_gather_extend(
&mut self,
other: &(dyn Array + 'static),
idxs: &[u32],
_share: ShareStrategy,
)
fn opt_gather_extend( &mut self, other: &(dyn Array + 'static), idxs: &[u32], _share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]]
is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Out-of-bounds indices are mapped to nulls.Source§impl<T> Default for ObjectChunkedBuilder<T>where
T: PolarsObject,
impl<T> Default for ObjectChunkedBuilder<T>where
T: PolarsObject,
Source§fn default() -> ObjectChunkedBuilder<T>
fn default() -> ObjectChunkedBuilder<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for ObjectChunkedBuilder<T>
impl<T> RefUnwindSafe for ObjectChunkedBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for ObjectChunkedBuilder<T>where
T: Send,
impl<T> Sync for ObjectChunkedBuilder<T>where
T: Sync,
impl<T> Unpin for ObjectChunkedBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for ObjectChunkedBuilder<T>where
T: UnwindSafe,
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