Skip to content

Product

Source code

Description

Compute the product of an expression.

Usage

<Expr>$product()

Value

Expr

Examples

library(polars)

pl$DataFrame(x = c(2L, NA, 2L))$
  with_columns(product = pl$col("x")$product())
#> shape: (3, 2)
#> ┌──────┬─────────┐
#> │ x    ┆ product │
#> │ ---  ┆ ---     │
#> │ i32  ┆ i64     │
#> ╞══════╪═════════╡
#> │ 2    ┆ 4       │
#> │ null ┆ 4       │
#> │ 2    ┆ 4       │
#> └──────┴─────────┘