--- id: pyreadr version: "0.5.6" license: AGPL-3.0-or-later license_treatment: agpl maintenance: active --- # pyreadr — Reads/writes R RData and Rds files into/from pandas data frames. License: agpl · Maintenance: active · Downloads: 265.5K/mo ## What it is and what it does pyreadr is a Python package that reads and writes R's native RData and Rds file formats, converting them to and from pandas DataFrames. It wraps the librdata C library and does not require R to be installed, making it a lightweight bridge between Python data workflows and R data archives. The package supports data frames, tibbles, vectors, matrices, arrays, and tables; R lists and S4 objects are not supported. The package is built on pre-compiled C extensions and depends only on pandas at runtime. It offers both basic file I/O (read_r, write_rdata, write_rds) and utility functions for inspecting file contents (list_objects) and downloading remote files. Compression options (gzip with configurable levels) are available for writing. The implementation is mature, actively maintained, and widely used in data science workflows that need to interoperate with R-generated datasets. Use it for: - Load R statistical analysis results or datasets into Python pandas for further processing or visualization - Convert R data frames from collaborative projects into Python-native format without running R - Write Python-generated DataFrames to RData or Rds format for sharing with R users or archival - Batch import multiple R data objects from a single RData file into a Python analysis pipeline - Stream R data from remote URLs directly into memory without intermediate disk storage ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads and writes R RData and Rds files directly into pandas DataFrames without requiring R or external dependencies installed. Yes. pyreadr is actively maintained, has no known vulnerabilities, and solves a specific and common problem—reading R data files in Python without R installed. The AGPL-3.0-or-later license is a consideration for proprietary use, but poses no barrier for open-source or internal projects. Pre-compiled wheels make installation frictionless on standard platforms. Install it if you regularly work with R-generated datasets. ## Install pip install pyreadr uv add pyreadr poetry add pyreadr ## Installing pyreadr Before you install: Medium install friction due to compiled C extensions; however, pre-compiled wheels are available for Windows, macOS (x86_64 and ARM64), and Linux (x86_64 and aarch64) across Python 3.10–3.13, making installation straightforward on standard platforms. Maintenance is active with a recent release. License in practice: Licensed under AGPL-3.0-or-later, which requires that any modifications to the package and derivative works be released under the same license. This is a copyleft license; using it in proprietary software requires careful review of your distribution model. Quickstart: import pyreadr result = pyreadr.read_r('data.RData') df = result['object_name'] # or result[None] for Rds files # To write: import pandas as pd df = pd.DataFrame({'A': [1, 2], 'B': ['a', 'b']}) pyreadr.write_rdata('output.RData', df, df_name='dataset') Requires a C compiler and zlib, bzip2, lzma libraries to build from source; pre-compiled wheels avoid this for standard platforms. Verify before relying: - Whether xarray is truly required only for 3D arrays or if there are other use cases that need it - Exact scope of R object types supported beyond data frames, tibbles, vectors, matrices, arrays, and tables - Performance characteristics when reading or writing large files ## Package facts - License: AGPL-3.0-or-later (agpl) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 265.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags read R data files python, RData Rds to pandas, R file format converter, import R data frames, R data serialization, librdata python wrapper, R statistical data import, data-interchange, r-integration [View on SkillFed](https://skillfed.io/packages/pyreadr) · [View on PyPI](https://pypi.org/project/pyreadr/)