rdata version 1.0#
The package rdata offers a lightweight way in Python to import and export R datasets/objects stored in the “.rda” and “.rds” formats. Its main advantages are:
It is a pure Python implementation, with no dependencies on the R language or related libraries. Thus, it can be used anywhere where Python is supported, including the web using Pyodide.
It attempts to support all objects that can be meaningfully translated between R and Python. As opposed to other solutions, you are no limited to import dataframes or data with a particular structure.
It allows users to easily customize the conversion of R classes to Python ones and vice versa. Does your data use custom R classes? Worry no longer, as it is possible to define custom conversions to the Python classes of your choosing.
It has a permissive license (MIT). As opposed to other packages that depend on R libraries and thus need to adhere to the GPL license, you can use rdata as a dependency on MIT, BSD or even closed source projects.
The package rdata is developed on Github. Please report issues there as well.