$npx skillfedfor your agent

pyreadstat

Reads and Writes SAS, SPSS and Stata files into/from pandas and polars data frames.

Worth itPyPI Scientific/EngineeringReleased Aug 20263.4M downloads / moApache-2.0Platform wheel

Decision gist · record as of 2026-08-14

platform wheels — pyreadstat-1.3.6-cp310-cp310-macosx_10_9_x86_64.whl · pyreadstat-1.3.6-cp310-cp310-macosx_11_0_arm64.whl · pyreadstat-1.3.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
v1.3.6 · released 2026-08-12 · 2 runtime deps: narwhals, numpy

Yes. Pyreadstat is worth installing if you work with SAS, SPSS, or Stata files and need to load them into Python. It is actively maintained, has no known vulnerabilities, offers significantly better performance than pandas' native read_sas, and preserves metadata that other readers discard. Medium install friction is manageable via prebuilt wheels. The Apache-2.0 license is permissive. The only caveat is the package's own disclaimer that it is not validated for critical reporting tasks where data accuracy is legally mandated.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a C compiler to build from source; prebuilt wheels simplify installation on common platforms.
  • Either pandas or polars must be installed separately.
  • Medium install friction due to compiled C extensions; prebuilt wheels available for Python 3.10–3.13 on macOS (x86_64 and arm64), Linux (x86_64 and aarch64), and Windows.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

last release 2026-08-12 (2 days) · last repo commit 2026-08-12 · 425 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,443,951 downloads/mo, #2,622 on PyPI

Verify before relying

pip install pyreadstat

import pyreadstat
df, meta = pyreadstat.read_sas7bdat('file.sas7bdat')
# or for SPSS:
df, meta = pyreadstat.read_sav('file.sav')
# or for Stata:
df, meta = pyreadstat.read_dta('file.dta')
  • Whether the package handles all SAS catalog (.sas7bcat) file variations reliably in production environments.
  • Performance characteristics when reading very large files with mixed data types on different platforms.
  • Completeness of support for SPSS and Stata format extensions and edge cases not covered in the documentation.
Same gist for agents: .md · .json

What it is and what it does

Pyreadstat is a Python wrapper around the ReadStat C library that reads and writes SAS (sas7bdat, sas7bcat, xport), SPSS (sav, zsav, por), and Stata (dta) files into pandas and polars DataFrames. It addresses key limitations in pandas' native read_sas method: it preserves value labels from the original files, correctly distinguishes between date and datetime columns (rather than converting all to datetime), automatically handles character encoding via UTF-8 conversion, and offers significantly faster performance on large files.

The package supports reading file headers only for quick metadata inspection, reading selected columns, chunked reading, parallel multiprocess reading, and reading value labels separately. It also supports writing DataFrames back to these formats with options for value labels and user-defined missing values. The library is actively maintained, has no known security vulnerabilities, and is positioned as a Python equivalent to R's Haven package.

Use it for

  • Migrate legacy SAS datasets to pandas or polars for modern data analysis workflows without losing value labels or date precision.
  • Quickly scan metadata from many SPSS or Stata files to identify datasets containing specific columns before full import.
  • Read large SPSS files in parallel processes to reduce load time when processing multiple files or very large single files.
  • Preserve and extract categorical value labels from SPSS or Stata files for reproducible statistical reporting.
  • Convert between SAS, SPSS, and Stata formats by reading into a DataFrame and writing to a different format.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Pyreadstat is worth installing if you work with SAS, SPSS, or Stata files and need to load them into Python. It is actively maintained, has no known vulnerabilities, offers significantly better performance than pandas' native read_sas, and preserves metadata that other readers discard. Medium install friction is manageable via prebuilt wheels. The Apache-2.0 license is permissive. The only caveat is the package's own disclaimer that it is not validated for critical reporting tasks where data accuracy is legally mandated.

Install

pyreadstat on PyPI

Before you install

Medium install friction due to compiled C extensions; prebuilt wheels available for Python 3.10–3.13 on macOS (x86_64 and arm64), Linux (x86_64 and aarch64), and Windows. Active maintenance with a release 2 days old.

Requires a C compiler to build from source; prebuilt wheels simplify installation on common platforms. Either pandas or polars must be installed separately.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install pyreadstat

import pyreadstat
df, meta = pyreadstat.read_sas7bdat('file.sas7bdat')
# or for SPSS:
df, meta = pyreadstat.read_sav('file.sav')
# or for Stata:
df, meta = pyreadstat.read_dta('file.dta')

Verify before relying

  • Whether the package handles all SAS catalog (.sas7bcat) file variations reliably in production environments.
  • Performance characteristics when reading very large files with mixed data types on different platforms.
  • Completeness of support for SPSS and Stata format extensions and edge cases not covered in the documentation.

Package facts

LicenseApache-2.0 permissive
Python supportNot specified
Install frictionMedium. Platform-specific wheel
Runtime dependencies
2 packages
narwhalsnumpy
MaintenanceActively maintained 2 days since the last release
Last repo commit
First released
Downloads3,443,951 / month, #2,622 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Environment :: ConsoleIntended Audience :: Science/ResearchProgramming Language :: CProgramming Language :: CythonProgramming Language :: PythonTopic :: Scientific/Engineering

Evidence: pyreadstat-1.3.6-cp310-cp310-macosx_10_9_x86_64.whl; pyreadstat-1.3.6-cp310-cp310-macosx_11_0_arm64.whl; pyreadstat-1.3.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pyreadstat-1.3.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyreadstat-1.3.6-cp310-cp310-win_amd64.whl; pyreadstat-1.3.6-cp311-cp311-macosx_10_9_x86_64.whl; pyreadstat-1.3.6-cp311-cp311-macosx_11_0_arm64.whl; pyreadstat-1.3.6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pyreadstat-1.3.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyreadstat-1.3.6-cp311-cp311-win_amd64.whl; pyreadstat-1.3.6-cp312-cp312-macosx_10_13_x86_64.whl; pyreadstat-1.3.6-cp312-cp312-macosx_11_0_arm64.whl; pyreadstat-1.3.6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pyreadstat-1.3.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyreadstat-1.3.6-cp312-cp312-win_amd64.whl; pyreadstat-1.3.6-cp313-cp313-macosx_10_13_x86_64.whl; pyreadstat-1.3.6-cp313-cp313-macosx_11_0_arm64.whl; pyreadstat-1.3.6-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pyreadstat-1.3.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyreadstat-1.3.6-cp313-cp313-win_amd64.whl

Tags

Capabilities
read sas7bdat files pythonspss sav file readerstata dta to dataframesas catalog value labelsread statistical data formatsconvert sas spss stata filesstatistical file format converter
Topics
data-importdataframe-io

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “spss sav file reader”

  • pyreadstatReads and writes SAS, SPSS, and Stata data files directly into pandas…
  • ndjsonProvides a familiar JSON Lines (ndjson) parser and writer with an API…
  • hbreaderOpens and reads files, URLs, and text strings through a single…

Give your agent the search over MCP, or paste the wish link into any chat.

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also pyreadr · sas7bdat · saspy · datacompy · great-tables · pandas-read-xml · fastparquet · gspread-dataframe · itables