Array#

The following methods are available under the expr.arr attribute.

Expr.arr.max()

Compute the max values of the sub-arrays.

Expr.arr.min()

Compute the min values of the sub-arrays.

Expr.arr.median()

Compute the median of the values of the sub-arrays.

Expr.arr.sum()

Compute the sum values of the sub-arrays.

Expr.arr.std([ddof])

Compute the std of the values of the sub-arrays.

Expr.arr.to_list()

Convert an Array column into a List column with the same inner data type.

Expr.arr.unique(*[, maintain_order])

Get the unique/distinct values in the array.

Expr.arr.n_unique()

Count the number of unique values in every sub-arrays.

Expr.arr.var([ddof])

Compute the var of the values of the sub-arrays.

Expr.arr.all()

Evaluate whether all boolean values are true for every subarray.

Expr.arr.any()

Evaluate whether any boolean value is true for every subarray.

Expr.arr.sort(*[, descending, nulls_last])

Sort the arrays in this column.

Expr.arr.reverse()

Reverse the arrays in this column.

Expr.arr.arg_min()

Retrieve the index of the minimal value in every sub-array.

Expr.arr.arg_max()

Retrieve the index of the maximum value in every sub-array.

Expr.arr.get(index, *[, null_on_oob])

Get the value by index in the sub-arrays.

Expr.arr.first()

Get the first value of the sub-arrays.

Expr.arr.last()

Get the last value of the sub-arrays.

Expr.arr.join(separator, *[, ignore_nulls])

Join all string items in a sub-array and place a separator between them.

Expr.arr.explode()

Returns a column with a separate row for every array element.

Expr.arr.contains(item)

Check if sub-arrays contain the given item.

Expr.arr.count_matches(element)

Count how often the value produced by element occurs.

Expr.arr.to_struct([fields])

Convert the Series of type Array to a Series of type Struct.

Expr.arr.shift([n])

Shift array values by the given number of indices.