List#

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

Series.list.all()

Evaluate whether all boolean values in a list are true.

Series.list.any()

Evaluate whether any boolean value in a list is true.

Series.list.arg_max()

Retrieve the index of the maximum value in every sublist.

Series.list.arg_min()

Retrieve the index of the minimal value in every sublist.

Series.list.concat(other)

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

Series.list.contains(item)

Check if sublists contain the given item.

Series.list.count_match(element)

Count how often the value produced by element occurs.

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

Calculate the n-th discrete difference of every sublist.

Series.list.eval(expr, *[, parallel])

Run any polars expression against the lists' elements.

Series.list.explode()

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

Series.list.first()

Get the first value of the sublists.

Series.list.get(index)

Get the value by index in the sublists.

Series.list.head([n])

Slice the first n values of every sublist.

Series.list.join(separator)

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

Series.list.last()

Get the last value of the sublists.

Series.list.lengths()

Get the length of the arrays as UInt32.

Series.list.max()

Compute the max value of the arrays in the list.

Series.list.mean()

Compute the mean value of the arrays in the list.

Series.list.min()

Compute the min value of the arrays in the list.

Series.list.reverse()

Reverse the arrays in the list.

Series.list.set_difference(other)

Compute the SET DIFFERENCE between the elements in this list and the elements of other.

Series.list.set_intersection(other)

Compute the SET INTERSECTION between the elements in this list and the elements of other.

Series.list.set_symmetric_difference(other)

Compute the SET SYMMETRIC DIFFERENCE between the elements in this list and the elements of other.

Series.list.set_union(other)

Compute the SET UNION between the elements in this list and the elements of other.

Series.list.shift([periods])

Shift values by the given period.

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

Slice every sublist.

Series.list.sort(*[, descending])

Sort the arrays in this column.

Series.list.sum()

Sum all the arrays in the list.

Series.list.tail([n])

Slice the last n values of every sublist.

Series.list.take(index, *[, null_on_oob])

Take sublists by multiple indices.

Series.list.to_struct([n_field_strategy, fields])

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

Series.list.unique(*[, maintain_order])

Get the unique/distinct values in the list.