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, ..., future = FALSE)

Arguments

x A Polars DataFrame
Ignored
future Setting this to TRUE will write Polars’ internal data structures that might not be available by other Arrow implementations. This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

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