Skip to content

ENH: Add support for converting DataFrames to R data.frames and matrices #1212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

lbeltrame
Copy link
Contributor

Finally I got around to implement this properly in pandas, and I added also a conversion to R matrices if need be. Notice that this doesn't handle MultiIndex and similar functionalities, but since I don't use them I'm not sure how they'd fit into R data frames.

The biggest drawback here is the use of an intermediate, but other solutions would probably involve hacking around the rpy2 internals (so far all the alternative solutions I found where worse, performance-wise).

Two (smallish) unit tests are included. This code has also been extensively used in production where I work.

All other unit tests pass after this change.

closes #350

@wesm
Copy link
Member

wesm commented May 14, 2012

This is really great, thanks so much

@wesm wesm closed this May 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conversion of DataFrame to R's data.frame
2 participants