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.
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32ccea27754d0caa2f8ae03f603cedb82976d9d75bb9fa425efb9b9986b69225
|
|
| MD5 |
75d9d707ecd9dd4a2d16a7ba7918f5ae
|
|
| BLAKE2b-256 |
85919cfee6a9ab688f49db4b9e3ab7dc98b5257e4101d766fcafc33d9e58a8e1
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
756323928f27edc3cd69c622aae214ec76494f73bcadb5c123151431729339b1
|
|
| MD5 |
f64fbc9866d0c7222ccec395b0e62003
|
|
| BLAKE2b-256 |
1cab00fef99c504b03a82b76b18f1f827c583eb1540c0c1e2f6d679ff12bbb21
|