-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Please don't drop pandas.rpy.common.convert_robJ #14272
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
Comments
Thank you @jorisvandenbossche for your quick response, The function I want to use is I think rpy2 can convert r dataframe but not named list containing dataframe (and possibly matrix etc.).
With those converters, it can work with more general data from R. Thanks |
cc @lgautier |
I'm willing to work on this ticket and relocate this function outside of rpy, in case you are in short of hands. Thanks |
@hzzyyy for things like this, I think we should encourage more and more pandas add-on 3rd party packages. This shifts development burden away from the core maintainership. We would be happy to maintain a list of "pandas-related 3rd party packages" on the pandas website, and additionally we are thinking about creating a dedicated pandas home on GitHub, and packages like this ("rpy_pandas") could go there. |
@wesm I totally agree and volunteer to work on rpy_pandas when it launches. |
Thanks for the cc @jorisvandenbossche . @hzzyyy :
Well, the conversion does not look too hard to me:
|
@lgautier Thank you for your reply, In a real example, the object is more complicated. The 'l' in your example will have multiple layers. For instance, the value corresponding to key 'a' can be another ListVector. With multiple entries. |
@hzzyyy : Then it does not appear to be a data frame. A way to achieve this is to redefine the conversion rule for R lists (with the cautionary note that the names in R lists are not necessarily unique), but that's an rpy2 question. The pandas issue tracker might no be the best place to discuss it. |
@jorisvandenbossche I made a local copy of the file I need. |
Currently pandas is the only well-known package supporting conversion from rpy2 object to dictionary.
There is warning message for rpy
Since the user primarily use rpy2 with pandas dataframe inputs, I strongly recommend keep this conversion functionality publicly available after rpy is retired.
We will be very grateful !!
The text was updated successfully, but these errors were encountered: