Struct ArrayNameSpace
pub struct ArrayNameSpace(pub Expr);Expand description
Specialized expressions for Series of DataType::Array.
Tuple Fields§
§0: ExprImplementations§
§impl ArrayNameSpace
impl ArrayNameSpace
pub fn dot(self, other: Expr) -> Expr
pub fn dot(self, other: Expr) -> Expr
Compute the row-wise dot product with another equal-width float array expression.
Both arrays are cast to a common supertype, which must be Float32 or
Float64. Pairs containing an inner null do not contribute to the sum. An
outer null row produces a null.
pub fn sort(self, options: SortOptions) -> Expr
pub fn arg_min(self) -> Expr
pub fn arg_min(self) -> Expr
Retrieve an index of a minimal value in every sub-array.
In the case of a tie, this may return the index of any of the minimum values.
pub fn arg_max(self) -> Expr
pub fn arg_max(self) -> Expr
Retrieve the index of the maximal value in every sub-array.
In the case of a tie, this may return the index of any of the maximum values.
pub fn join(self, separator: Expr, ignore_nulls: bool) -> Expr
pub fn join(self, separator: Expr, ignore_nulls: bool) -> Expr
Join all string items in a sub-array and place a separator between them.
§Error
Raise if inner type of array is not DataType::String.
pub fn contains<E>(self, other: E, nulls_equal: bool) -> Expr
Available on crate feature is_in only.
pub fn contains<E>(self, other: E, nulls_equal: bool) -> Expr
is_in only.Check if the sub-array contains specific element
pub fn count_matches<E>(self, element: E) -> Expr
Available on crate feature array_count only.
pub fn count_matches<E>(self, element: E) -> Expr
array_count only.Count how often the value produced by element occurs.
pub fn to_struct( self, name_generator: Option<PlanCallback<usize, String>>, ) -> Expr
array_to_struct only.pub fn slice(
self,
offset: Expr,
length: Expr,
as_array: bool,
) -> Result<Expr, PolarsError>
pub fn slice( self, offset: Expr, length: Expr, as_array: bool, ) -> Result<Expr, PolarsError>
Slice every subarray.
pub fn head(self, n: Expr, as_array: bool) -> Result<Expr, PolarsError>
pub fn head(self, n: Expr, as_array: bool) -> Result<Expr, PolarsError>
Get the head of every subarray
pub fn tail(self, n: Expr, as_array: bool) -> Result<Expr, PolarsError>
pub fn tail(self, n: Expr, as_array: bool) -> Result<Expr, PolarsError>
Get the tail of every subarray
pub fn explode(self, options: ExplodeOptions) -> Expr
pub fn explode(self, options: ExplodeOptions) -> Expr
Returns a column with a separate row for every array element.
pub fn eval<E>(self, other: E, as_list: bool) -> Expr
pub fn agg<E>(self, other: E) -> Expr
Auto Trait Implementations§
impl !Freeze for ArrayNameSpace
impl !RefUnwindSafe for ArrayNameSpace
impl Send for ArrayNameSpace
impl Sync for ArrayNameSpace
impl Unpin for ArrayNameSpace
impl UnsafeUnpin for ArrayNameSpace
impl !UnwindSafe for ArrayNameSpace
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
§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> ⓘ
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> ⓘ
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