Array#

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

Series.arr.arg_max()

Retrieve the index of the maximum value in every sublist.

Series.arr.arg_min()

Retrieve the index of the minimal value in every sublist.

Series.arr.concat(other)

Concat the arrays in a Series dtype List in linear time.

Series.arr.contains(item)

Check if sublists contain the given item.

Series.arr.diff([n, null_behavior])

Calculate the n-th discrete difference of every sublist.

Series.arr.eval(expr[, parallel])

Run any polars expression against the lists' elements.

Series.arr.first()

Get the first value of the sublists.

Series.arr.get(index)

Get the value by index in the sublists.

Series.arr.head([n])

Slice the first n values of every sublist.

Series.arr.join(separator)

Join all string items in a sublist and place a separator between them.

Series.arr.last()

Get the last value of the sublists.

Series.arr.lengths()

Get the length of the arrays as UInt32.

Series.arr.max()

Compute the max value of the arrays in the list.

Series.arr.mean()

Compute the mean value of the arrays in the list.

Series.arr.min()

Compute the min value of the arrays in the list.

Series.arr.reverse()

Reverse the arrays in the list.

Series.arr.shift([periods])

Shift values by the given period.

Series.arr.slice(offset[, length])

Slice every sublist.

Series.arr.sort([reverse])

Sort the arrays in the list.

Series.arr.sum()

Sum all the arrays in the list.

Series.arr.tail([n])

Slice the last n values of every sublist.

Series.arr.to_struct([n_field_strategy, ...])

Convert the series of type List to a series of type Struct.

Series.arr.unique()

Get the unique/distinct values in the list.