polars.Expr.arr.max#

Expr.arr.max() Expr[source]#

Compute the max values of the sub-arrays.

Examples

>>> df = pl.DataFrame(
...     data={"a": [[1, 2], [4, 3]]},
...     schema={"a": pl.Array(width=2, inner=pl.Int64)},
... )
>>> df.select(pl.col("a").arr.max())
shape: (2, 1)
┌─────┐
│ a   │
│ --- │
│ i64 │
╞═════╡
│ 2   │
│ 4   │
└─────┘