You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks some thing more be saved at the calling of readr.write_rdsforcely ?
And, I didn't find any option like save_rownames at this function's help doc also ...
File example
You can make the first rds file by this in R:
data.frame(A=1:3, B=4:2) |> saveRDS("df0.rds")
Expected behavior
The behavior of write_rds should just like saveRDS in R ... If the object have row names then save it, if don't, then don't save it ... Well, that's just my suggestion, I don't know did that possible on python.
Setup Information
How did you install pyreadr? (pip)
Platform (linux 64 bit)
Python Version (3.10)
Python Distribution (plain python)
Using Virtualenv or condaenv? (yes)
The text was updated successfully, but these errors were encountered:
Thanks for the report. Regarding not being able to save your pandas index into R rownames, the issue has been already reported here. Basically pyreadr is a wrapper around the C library librdata, and since the funcitonality is not supported by the C library it cannot be fixed for now, until they fix it first in the C library.
Regarding the R dataframe having rownames by default, it seems that is the behavior in R itself if you do not define the rownames explicitly (see screenshot), therefore nothing to be fixed there I think.
I saw this at README:
But this is what I meet:
Looks some thing more be saved at the calling of
readr.write_rds
forcely ?And, I didn't find any option like
save_rownames
at this function's help doc also ...File example
You can make the first rds file by this in R:
Expected behavior
The behavior of
write_rds
should just likesaveRDS
in R ... If the object have row names then save it, if don't, then don't save it ... Well, that's just my suggestion, I don't know did that possible on python.Setup Information
The text was updated successfully, but these errors were encountered: