Skip to content

Get number of chunks used by the ChunkedArrays of this DataFrame

Description

Get number of chunks used by the ChunkedArrays of this DataFrame

Usage

<DataFrame>$n_chunks(strategy = c("first", "all"))

Arguments

strategy Return the number of chunks of the “first” column, or “all” columns in this DataFrame.

Value

An integer vector.

Examples

library("polars")

df <- pl$DataFrame(
  a = c(1, 2, 3, 4),
  b = c(0.5, 4, 10, 13),
  c = c(TRUE, TRUE, FALSE, TRUE)
)

df$n_chunks()
#> [1] 1
df$n_chunks(strategy = "all")
#> a b c 
#> 1 1 1