Reputation: 18790
I have a Dataframe in %python environment, and try to use that in %r environment.
How can I convert a spark dataframe under %python to %r ?
Upvotes: 4
Views: 2647
Reputation: 330183
It is not even worth trying. The idiomatic way is to register temporary view and let metastore do the rest. In Python:
df.createOrReplaceTempView("some_name")
in R:
sql("REFRESH TABLE some_name")
df <- sql("SELECT * FROM some_name")
Upvotes: 5