Return the element at the given row/column.
Description
If row and column location are not specified, the DataFrame must have dimensions (1, 1).
Usage
<DataFrame>$item(row = NULL, column = NULL)
Arguments
row
|
Optional row index (0-indexed). |
column
|
Optional column index (0-indexed) or name. |
Value
A value of length 1
Examples
library("polars")
df = pl$DataFrame(a = c(1, 2, 3), b = c(4, 5, 6))
df$select((pl$col("a") * pl$col("b"))$sum())$item()
#> [1] 32
#> [1] 5
#> [1] 6