Skip to main content

researchpy

ResearchPy is a Python package that is designed to be easy to use and deliver univariate, bivariate, and multivariate models and statistical tests with clear and informative outputs ready for interpretation, further analysis, and downstream export without additional formatting. Open-source, clear function names, intuitive parameters, and robust documentation.

Built for researchers, analysts transitioning from SPSS/Stata/R, and students learning statistics.

PyPI version License: MIT

Features

  • Descriptive statisticssummarize(), summary_cont(), summary_cat(), codebook()
  • Difference tests — Independent t-test, paired t-test, Welch's t-test, Wilcoxon signed-rank via difference_test()
  • ANOVA — Type I, II, and III sum of squares with anova()
  • Correlation — Correlation matrices and testing
  • Crosstabs — Cross-tabulation with chi-square testing
  • OLS regression — Ordinary least squares modeling
  • Effect sizes — Cohen's d, Hedge's g, Glass's delta, eta/epsilon/omega squared, and more
  • Confidence intervals — Included by default in descriptive and inferential output
  • Structured output — Results returned as pandas DataFrames, ready for reporting

Installation

pip install researchpy

Quick Start

import pandas as pd
import researchpy as rp

# Load example data
df = pd.DataFrame({
    "score": [88, 92, 75, 85, 90, 78, 95, 70, 82, 87,
              72, 68, 80, 76, 74, 69, 71, 77, 73, 79],
    "group": ["treatment"]*10 + ["control"]*10
})

ANOVA

model = rp.anova("score ~ C(group)", data=df) # Type III sum of squares by default
descriptives, results = model.results()
print(descriptives, results, sep = "\n"*2)

Codebook

rp.codebook(df)

Difference Test

desc, results = rp.difference_test("score ~ C(group)", data=df).conduct(effect_size="all")
print(desc, results, sep = "\n"*2)

Summarize

# Continuous summary statistics
rp.summarize(df["score"], stats=["N", "Mean", "SD", "SE", "CI"])

# Categorical frequency table
rp.summary_cat(df["group"])

Requirements

  • Python ≥ 3.12
  • pandas ≥ 3.0.1
  • numpy ≥ 2.5.0
  • scipy ≥ 1.17.1
  • statsmodels ≥ 0.14.0
  • patsy ≥ 1.0.2 (for legacy formula parsing, will be removed in future versions)
  • requests ≥ 2.34.2
  • formulaic ≥ 1.2.2 (for new formula parsing)

Documentation

Full documentation is available at researchpy.readthedocs.io.

License

ResearchPy is released under the MIT License.

Citation

If you use ResearchPy in your research, please cite:

Bryant, C. (2018–2026). researchpy (Version X.Y.Z) [Python package]. https://github.com/Corey-Bryant/researchpy

To find your installed version for citation:

import researchpy
print(researchpy.__version__)

Current citation with version number:

Bryant, C. (2018–2026). researchpy (Version 0.3.7.2) [Python package]. https://github.com/Corey-Bryant/researchpy

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

researchpy-0.3.7.2.tar.gz (149.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

researchpy-0.3.7.2-py3-none-any.whl (145.7 kB view details)

Uploaded Python 3

File details

Details for the file researchpy-0.3.7.2.tar.gz.

File metadata

  • Download URL: researchpy-0.3.7.2.tar.gz
  • Upload date:
  • Size: 149.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for researchpy-0.3.7.2.tar.gz
Algorithm Hash digest
SHA256 32ccea27754d0caa2f8ae03f603cedb82976d9d75bb9fa425efb9b9986b69225
MD5 75d9d707ecd9dd4a2d16a7ba7918f5ae
BLAKE2b-256 85919cfee6a9ab688f49db4b9e3ab7dc98b5257e4101d766fcafc33d9e58a8e1

See more details on using hashes here.

File details

Details for the file researchpy-0.3.7.2-py3-none-any.whl.

File metadata

  • Download URL: researchpy-0.3.7.2-py3-none-any.whl
  • Upload date:
  • Size: 145.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for researchpy-0.3.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 756323928f27edc3cd69c622aae214ec76494f73bcadb5c123151431729339b1
MD5 f64fbc9866d0c7222ccec395b0e62003
BLAKE2b-256 1cab00fef99c504b03a82b76b18f1f827c583eb1540c0c1e2f6d679ff12bbb21

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.7.2 This release

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.2

2 files

0.3.1

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

1 file

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page