Skip to content
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

Conversion to R matrix wreaks havoc in case of mixed type DataFrames #1282

Closed
lbeltrame opened this issue May 22, 2012 · 2 comments
Closed
Labels
Milestone

Comments

@lbeltrame
Copy link
Contributor

When converting a mixed_type DataFrame to a R matrix (not a data.frame), everything is casted to string vectors, because a matrix can't be heterogeneously typed, to my knowledge.

I have two possible solutions I can send as pull request, and I would like to ask which is better:

  1. raise ValueError for mixed type dataframes
  2. raise a warning

Given that most matrices needed in R are the numeric ones, I would go for option 1.

@lbeltrame
Copy link
Contributor Author

Fixing this with a warning is opening a can of worms. Setting with the exception for now.

@wesm
Copy link
Member

wesm commented May 23, 2012

That seems like the right move. As long as heterogeneous data.frames are not an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants