Skip to content

Create a arrow RecordBatchReader from a Polars object

Description

Create a arrow RecordBatchReader from a Polars object

Usage

## S3 method for class 'RPolarsDataFrame'
as_record_batch_reader(x, ..., compat_level = FALSE)

Arguments

x A Polars DataFrame
Ignored
compat_level Use a specific compatibility level when exporting Polars’ internal data structures. This can be:
  • an integer indicating the compatibility version (currently only 0 for oldest and 1 for newest);
  • a logical value with TRUE for the newest version and FALSE for the oldest version.

Examples

library("polars")


library(arrow)

pl_df = as_polars_df(mtcars)
as_record_batch_reader(pl_df)
#> RecordBatchReader
#> 11 columns
#> mpg: double
#> cyl: double
#> disp: double
#> hp: double
#> drat: double
#> wt: double
#> qsec: double
#> vs: double
#> am: double
#> gear: double
#> carb: double