Skip to main content

ListAccessor

Struct ListAccessor 

Source
pub struct ListAccessor<'a> { /* private fields */ }
Expand description

Accessor for list operations on a Series.

Created by Series::list(). Values are currently represented as UTF-8 JSON arrays, which gives callers real list namespace behavior while the native Arrow ListDtype storage backend is still pending.

Implementations§

Source§

impl ListAccessor<'_>

Source

pub fn series_name(&self) -> &str

Return the owning Series name for diagnostics.

Source

pub fn is_supported(&self) -> bool

Whether every non-missing value can be interpreted as a list.

Source

pub fn unsupported_reason(&self) -> String

Typed explanation for fail-closed list operations.

Source

pub fn len(&self) -> Result<Series, FrameError>

Return the length of each list value.

Missing list values propagate as null. Non-list values reject the operation before any output is produced.

Source

pub fn get(&self, index: i64) -> Result<Series, FrameError>

Extract one element from each list value.

Negative positions count from the end of each list. Missing lists and out-of-bounds positions produce nulls, matching pandas-style nullable element extraction.

Source

pub fn flatten(&self) -> Result<Series, FrameError>

Flatten list values into a single Series.

Missing lists are skipped. Missing elements inside a list remain null values in the flattened output.

Source

pub fn sum(&self) -> Result<Series, FrameError>

Sum elements within each list.

Returns a Series with the sum of each list. Missing lists return NaN.

Source

pub fn mean(&self) -> Result<Series, FrameError>

Mean of elements within each list.

Returns a Series with the mean of each list. Missing lists return NaN.

Source

pub fn min(&self) -> Result<Series, FrameError>

Minimum of elements within each list.

Source

pub fn max(&self) -> Result<Series, FrameError>

Maximum of elements within each list.

Source

pub fn join(&self, sep: &str) -> Result<Series, FrameError>

Join list elements with a separator.

Source

pub fn contains(&self, item: &Scalar) -> Result<Series, FrameError>

Check if each list contains a given element.

Source

pub fn unique(&self) -> Result<Series, FrameError>

Get unique elements within each list, preserving order.

Auto Trait Implementations§

§

impl<'a> Freeze for ListAccessor<'a>

§

impl<'a> RefUnwindSafe for ListAccessor<'a>

§

impl<'a> Send for ListAccessor<'a>

§

impl<'a> Sync for ListAccessor<'a>

§

impl<'a> Unpin for ListAccessor<'a>

§

impl<'a> UnsafeUnpin for ListAccessor<'a>

§

impl<'a> UnwindSafe for ListAccessor<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.