Skip to content

Not converting pandas dataframe to R dataframe as of new Pandas 3.0.0 update. #1881

@lq27

Description

@lq27

I have a python library which has a function, py_foo() which returns a pandas dataframe. I have an R function r_foo() which returns reticulate::py_foo(). With pandas 2.3.3, this is not an issue, and reticulate automatically converts the pandas dataframe to an R data.frame. But when pandas updated to 3.0.0, reticulate was unable to do the conversion, such that r_foo() returns a python pandas object in my R code.

Using reticulate::py_to_r() did not work; i.e. r_foo() { return reticulate::py_to_r(reticulate::py_foo())doesn't work.

(When I force installed pandas 2.3.3, my original functionality was restored. )

Unfortunately, I don't have a minimal reproducible example, since my libraries and function calls are embedded in two complex library structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions