Write Arrow IPC data to a raw vector
Description
Write Arrow IPC data to a raw vector
Usage
<DataFrame>$to_raw_ipc(
compression = c("uncompressed", "zstd", "lz4"),
...,
compat_level = FALSE
)
Arguments
compression
|
NULL or a character of the compression method,
“uncompressed” or "lz4" or "zstd". NULL is
equivalent to “uncompressed” . Choose "zstd" for good
compression performance. Choose "lz4" for fast
compression/decompression.
|
…
|
Ignored. |
compat_level
|
Use a specific compatibility level when exporting Polars’ internal data
structures. This can be:
|
Value
A raw vector
See Also
-
\
$write_ipc()
Examples
library("polars")
df = pl$DataFrame(
foo = 1:5,
bar = 6:10,
ham = letters[1:5]
)
raw_ipc = df$to_raw_ipc()
pl$read_ipc(raw_ipc)
#> shape: (5, 3)
#> ┌─────┬─────┬─────┐
#> │ foo ┆ bar ┆ ham │
#> │ --- ┆ --- ┆ --- │
#> │ i32 ┆ i32 ┆ str │
#> ╞═════╪═════╪═════╡
#> │ 1 ┆ 6 ┆ a │
#> │ 2 ┆ 7 ┆ b │
#> │ 3 ┆ 8 ┆ c │
#> │ 4 ┆ 9 ┆ d │
#> │ 5 ┆ 10 ┆ e │
#> └─────┴─────┴─────┘
#> Table
#> 5 rows x 3 columns
#> $foo <int32>
#> $bar <int32>
#> $ham <large_string>