{"categories":[{"label":"Scientific/Engineering","url":"https://skillfed.io/packages/category/scientific-engineering/2"}],"enrichment":{"capability":"Reads and writes SAS, SPSS, and Stata data files directly into pandas and polars DataFrames, preserving value labels, dates, and encodings.","skillfed_tags":["data-import","dataframe-io"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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."},"id":"pyreadstat","links":{"html":"https://skillfed.io/packages/pyreadstat","md":"https://skillfed.io/packages/pyreadstat.md","pypi":"https://pypi.org/project/pyreadstat/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-12","license_spdx":null,"license_treatment":"permissive","name":"pyreadstat","python_support":"unspecified","summary":"Reads and Writes SAS, SPSS and Stata files into/from pandas and polars data frames."},"popularity":{"monthly_downloads":3443951,"position":2622,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.3.6"}
