Skip to content

Compute the product of an expression.

Description

Compute the product of an expression.

Usage

<Expr>$product()

Value

A polars expression

Examples

library("polars")

pl$DataFrame(a = 1:3, b = c(NA, 4, 4))$
  select(pl$all()$product())
#> shape: (1, 2)
#> ┌─────┬──────┐
#> │ a   ┆ b    │
#> │ --- ┆ ---  │
#> │ i64 ┆ f64  │
#> ╞═════╪══════╡
#> │ 6   ┆ 16.0 │
#> └─────┴──────┘