-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Milestone
Description
In the past, one could generating a nanoarrow Array object and pass it from R via reticulate to Python to, say, instantiate a polars object.
That no longer works as an intermediate PyCapsule layer is added, and this may need an extra layer of unpacking
> pp <- palmerpenguins::penguins
> na <- nanoarrow::as_nanoarrow_array(pp)
> class(na)
[1] "nanoarrow_array"
> pdf <- polars::as_polars_lf(na) # conversion on the R side, R package `polars` know `nanoarrow`
> pdf
<polars_lazy_frame>
>
> po <- reticulate::import("polars")
> df <- po$from_arrow(na) # conversion on the Python side via `reticulate`
Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
TypeError: expected PyArrow Table, Array, or one or more RecordBatches; got 'PyCapsule'
Run `reticulate::py_last_error()` for details.
> Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels