Skip to content

Multiply Series

Source code

Description

Method equivalent of multiplication operator series * other.

Usage

<Series>$mul(other)

Arguments

other Series like object of numeric. Converted to Series by as_polars_series() in this method.

Value

Series

See Also

  • Arithmetic operators

Examples

library("polars")

as_polars_series(1:3)$mul(11:13)
#> polars Series: shape: (3,)
#> Series: '' [i32]
#> [
#>  11
#>  24
#>  39
#> ]
as_polars_series(1:3)$mul(as_polars_series(11:13))
#> polars Series: shape: (3,)
#> Series: '' [i32]
#> [
#>  11
#>  24
#>  39
#> ]
as_polars_series(1:3)$mul(1L)
#> polars Series: shape: (3,)
#> Series: '' [i32]
#> [
#>  1
#>  2
#>  3
#> ]