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 statistics — summarize(), 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

Release files for researchpy 0.3.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for researchpy 0.3.7.2
File Size Uploaded
researchpy-0.3.7.2.tar.gz 149.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for researchpy 0.3.7.2
File Interpreter ABI Platform
researchpy-0.3.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 295.4 kB

Release files / researchpy-0.3.7.2.tar.gz

Download URL researchpy-0.3.7.2.tar.gz
Size 149.7 kB
Tags Source
SHA-256 checksum
How to use checksums
32ccea27754d0caa2f8ae03f603cedb82976d9d75bb9fa425efb9b9986b69225
BLAKE2b-256 checksum
How to use checksums
85919cfee6a9ab688f49db4b9e3ab7dc98b5257e4101d766fcafc33d9e58a8e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / researchpy-0.3.7.2-py3-none-any.whl

Download URL researchpy-0.3.7.2-py3-none-any.whl
Size 145.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
756323928f27edc3cd69c622aae214ec76494f73bcadb5c123151431729339b1
BLAKE2b-256 checksum
How to use checksums
1cab00fef99c504b03a82b76b18f1f827c583eb1540c0c1e2f6d679ff12bbb21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.3.7.2 This release

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

1 release file

0.0.0

2 release 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