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<'_>
impl ListAccessor<'_>
Sourcepub fn series_name(&self) -> &str
pub fn series_name(&self) -> &str
Return the owning Series name for diagnostics.
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
Whether every non-missing value can be interpreted as a list.
Sourcepub fn unsupported_reason(&self) -> String
pub fn unsupported_reason(&self) -> String
Typed explanation for fail-closed list operations.
Sourcepub fn len(&self) -> Result<Series, FrameError>
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.
Sourcepub fn get(&self, index: i64) -> Result<Series, FrameError>
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.
Sourcepub fn flatten(&self) -> Result<Series, FrameError>
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.
Sourcepub fn sum(&self) -> Result<Series, FrameError>
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.
Sourcepub fn mean(&self) -> Result<Series, FrameError>
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.
Sourcepub fn min(&self) -> Result<Series, FrameError>
pub fn min(&self) -> Result<Series, FrameError>
Minimum of elements within each list.
Sourcepub fn max(&self) -> Result<Series, FrameError>
pub fn max(&self) -> Result<Series, FrameError>
Maximum of elements within each list.
Sourcepub fn join(&self, sep: &str) -> Result<Series, FrameError>
pub fn join(&self, sep: &str) -> Result<Series, FrameError>
Join list elements with a separator.
Sourcepub fn contains(&self, item: &Scalar) -> Result<Series, FrameError>
pub fn contains(&self, item: &Scalar) -> Result<Series, FrameError>
Check if each list contains a given element.
Sourcepub fn unique(&self) -> Result<Series, FrameError>
pub fn unique(&self) -> Result<Series, FrameError>
Get unique elements within each list, preserving order.