Skip to content

Divide Series

Source code

Description

Method equivalent of division operator series / other.

Usage

<Series>$div(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)$div(11:13)
#> polars Series: shape: (3,)
#> Series: '' [i32]
#> [
#>  0
#>  0
#>  0
#> ]
as_polars_series(1:3)$div(as_polars_series(11:13))
#> polars Series: shape: (3,)
#> Series: '' [i32]
#> [
#>  0
#>  0
#>  0
#> ]
as_polars_series(1:3)$div(1L)
#> polars Series: shape: (3,)
#> Series: '' [i32]
#> [
#>  1
#>  2
#>  3
#> ]