polars.Expr.pow#

Expr.pow(exponent: int | float | Series | Expr) Self[source]#

Raise expression to the power of exponent.

Examples

>>> df = pl.DataFrame({"foo": [1, 2, 3, 4]})
>>> df.select(pl.col("foo").pow(3))
shape: (4, 1)
┌──────┐
│ foo  │
│ ---  │
│ f64  │
╞══════╡
│ 1.0  │
│ 8.0  │
│ 27.0 │
│ 64.0 │
└──────┘