How to pass python df to R df in Jupyter Notebook?

Viewed 54

I am receiving an error when trying to send python df to R df in Jupyter Notebook. There is data in this df.

# Prior Cell
df = pd.DataFrame(full_4)
%R -i df

My error is: ValueError: The name cannot be an empty string

1 Answers

First, I think you need making activate r, like:

from rpy2.robjects import r, pandas2ri

pandas2ri.activate()
Related