Trait polars::prelude::ListNameSpaceImpl
source · [−]pub trait ListNameSpaceImpl: AsList {
Show 16 methods
fn lst_join(
&self,
separator: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError> { ... }
fn lst_max(&self) -> Series { ... }
fn lst_min(&self) -> Series { ... }
fn lst_sum(&self) -> Series { ... }
fn lst_mean(&self) -> ChunkedArray<Float64Type> { ... }
fn lst_sort(&self, reverse: bool) -> ChunkedArray<ListType> { ... }
fn lst_reverse(&self) -> ChunkedArray<ListType> { ... }
fn lst_unique(&self) -> Result<ChunkedArray<ListType>, PolarsError> { ... }
fn lst_arg_min(&self) -> ChunkedArray<UInt32Type> { ... }
fn lst_arg_max(&self) -> ChunkedArray<UInt32Type> { ... }
fn lst_diff(
&self,
n: usize,
null_behavior: NullBehavior
) -> ChunkedArray<ListType> { ... }
fn lst_shift(&self, periods: i64) -> ChunkedArray<ListType> { ... }
fn lst_slice(&self, offset: i64, length: usize) -> ChunkedArray<ListType> { ... }
fn lst_lengths(&self) -> ChunkedArray<UInt32Type> { ... }
fn lst_get(&self, idx: i64) -> Result<Series, PolarsError> { ... }
fn lst_concat(
&self,
other: &[Series]
) -> Result<ChunkedArray<ListType>, PolarsError> { ... }
}
Provided Methods
fn lst_join(
&self,
separator: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
fn lst_join(
&self,
separator: &str
) -> Result<ChunkedArray<Utf8Type>, PolarsError>
In case the inner dtype DataType::Utf8
, the individual items will be joined into a
single string separated by separator
.
fn lst_mean(&self) -> ChunkedArray<Float64Type>
fn lst_sort(&self, reverse: bool) -> ChunkedArray<ListType>
fn lst_reverse(&self) -> ChunkedArray<ListType>
fn lst_unique(&self) -> Result<ChunkedArray<ListType>, PolarsError>
fn lst_arg_min(&self) -> ChunkedArray<UInt32Type>
fn lst_arg_max(&self) -> ChunkedArray<UInt32Type>
fn lst_diff(
&self,
n: usize,
null_behavior: NullBehavior
) -> ChunkedArray<ListType>
fn lst_shift(&self, periods: i64) -> ChunkedArray<ListType>
fn lst_lengths(&self) -> ChunkedArray<UInt32Type>
Get the value by index in the sublists.
So index 0
would return the first item of every sublist
and index -1
would return the last item of every sublist
if an index is out of bounds, it will return a None
.