# Pingouin for detailed statistical reports in Python

> Pingouin adds effect sizes, confidence intervals, power calculations, and Bayes Factors to familiar NumPy and Pandas data. It suits Python researchers who want one call to return a fuller statistical report, with extra dependencies for selected functions.

**raphaelvallat/pingouin** — Statistical package in Python based on Pandas

- Repository: https://github.com/raphaelvallat/pingouin
- Website: https://pingouin-stats.org/
- Stars: 1,938 · Forks: 177
- Language: Python
- License: GPL-3.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/raphaelvallat-pingouin

## Pingouin's statistical reporting scope

Pingouin addresses a specific gap between low-level numerical routines and complete statistical reports. The README contrasts Pingouin's `ttest` with SciPy's `ttest_ind`, which it describes as returning the T-value and p-value. Pingouin expands that output to include degrees of freedom, Cohen's d, a 95% confidence interval for the difference in means, statistical power, and BF10. That distinction matters when an engineer or researcher wants the primary test and its interpretation metrics in one tabular result.

The package is aimed at users of Python 3, NumPy, and Pandas who need statistical functions without assembling every result manually. Its documented subject areas include N-way, repeated-measures, mixed, and ANCOVA designs; parametric and non-parametric pairwise tests; several correlation methods; linear and logistic regression; mediation analysis; Bayes Factors; multivariate tests; reliability; power analysis; circular statistics; and chi-squared tests.

This is a wide collection of tools rather than a replacement for the whole SciPy ecosystem. Pingouin builds on Pandas and NumPy, while SciPy supplies a broader low-level numerical and statistical foundation visible in the dependency declarations. Its benefit is the shape of the returned reports. Its corresponding constraint is that users still need to select the correct function and interpret each measure in the context of the study design.

## Pandas inputs and result-oriented statistical functions

Pingouin's API is designed around data that researchers can express as Python lists, NumPy arrays, or Pandas DataFrames. For tests using two samples, arrays can be passed directly. For ANOVA, named DataFrame columns identify the dependent variable and grouping factors. This lets a statistical function operate on explicit column names instead of requiring every factor to be encoded as a separate array.

The call result is also structured around interpretation. The README's independent-samples example returns a row containing `T`, `dof`, `alternative`, `p_val`, `CI95`, `cohen_d`, `power`, and `BF10`. Correlation follows a similar pattern, returning fields such as `n`, `r`, `CI95`, `p_val`, `BF10`, and `power`. These are Pandas-style result objects, which makes them suitable for inspection in notebooks and for integration into tabular analysis code.

Pingouin also supports different correlation strategies through arguments such as `method="bicor"`. The documented example changes one value and then requests a biweight midcorrelation, illustrating that the data can remain in the same Python objects while the estimator changes. ANOVA inputs follow the DataFrame model, while circular statistics, reliability calculations, plotting functions, bootstrapped confidence intervals, and other analyses extend the same package-oriented approach to different data shapes.

The available methods do not make every result interchangeable. A Pearson coefficient, biweight midcorrelation, and partial correlation answer different questions. Likewise, adding BF10 or statistical power to a test does not remove the need to state the statistical model, alternative hypothesis, interval method, or sample assumptions. Pingouin consolidates reporting, but it does not make those methodological choices automatic.

## Installing Pingouin across pip, uv, and conda

Pingouin requires Python 3.11 or later. The README documents installation with `uv`, `pip`, and conda. The simplest documented command installs the package from its normal package index:

```bash
pip install pingouin
```

A project using `uv` can use the equivalent command:

```bash
uv pip install pingouin
```

Conda users are directed to the `conda-forge` channel:

```bash
conda install -c conda-forge pingouin
```

The core dependencies have relatively high minimum versions: NumPy 2.2.2, SciPy 1.15.0, Pandas 2.3.0, Matplotlib 3.10.1, Seaborn 0.13.2, and Scikit-learn 1.6.1 are required. `tabulate` is also listed. These floors should be checked before introducing Pingouin into an existing scientific environment, because resolving them may require changes to other packages.

Some functions need `extras`. According to the README, that group installs Statsmodels for ANCOVA, partial correlation with confounds, and certain unbalanced or N-way ANOVA cases. It also installs Mpmath for a one-sided Pearson Bayes Factor. Use the extras group when those specific functions are needed:

```bash
pip install "pingouin[extras]"
```

For a source checkout, the documented editable installation also installs the development dependency group:

```bash
git clone https://github.com/raphaelvallat/pingouin.git
cd pingouin
uv pip install --group=dev --editable .
```

The repository includes tests, and the README gives `pytest --verbose` as the command for running them. No test result is claimed here.

## Running Pingouin's first t-test and correlation report

The README's first example creates two related samples with `np.random.multivariate_normal`, fixes the random seed, and passes both samples to `pg.ttest`. The seed makes the documented example repeatable, while the data setup gives the test realistic variation rather than manually entered summary values.

```python
import numpy as np
import pingouin as pg

np.random.seed(123)
mean, cov, n = [4, 5], [(1, .6), (.6, 1)], 30
x, y = np.random.multivariate_normal(mean, cov, n).T

pg.ttest(x, y)
```

According to the README, the call produces the T-value, degrees of freedom, alternative, p-value, confidence interval, Cohen's d, power, and BF10. A second call uses the same arrays for Pearson correlation:

```python
pg.corr(x, y)
```

The documented output includes sample size, correlation coefficient, confidence interval, p-value, BF10, and power. This is a real first analysis rather than a plotting-only example because it turns raw observations into a compact statistical report.

The README also shows how to change the correlation estimator after introducing an outlier:

```python
x[5] = 18
pg.corr(x, y, method="bicor")
```

That example gives readers a direct way to inspect sensitivity to an extreme observation. It does not establish that one estimator should always replace Pearson correlation. The appropriate choice depends on the model and data-generating process. For a first use, `pg.ttest` and `pg.corr` expose Pingouin's main reporting convention clearly: one function returns the central test result and several interpretation metrics together.

## Dependency, licensing, and release considerations for Pingouin

Pingouin is licensed under `GPL-3.0-only`. That license governs use and distribution of the project and its covered code. It can affect how the package is incorporated into distributed software, so teams with compliance questions need to review the repository's `LICENSE` file and obtain appropriate advice for their situation. This article does not interpret the license's legal obligations.

The maintenance record shows recent activity. The repository is not archived, and the last push was on 2026-10-13. Recent releases include Pingouin v0.7.0 on 2026-09-26, v0.6.1 on 2026-03-28, and v0.6.0 on 2026-02-24. Those records indicate recent release work, although they do not by themselves document the compatibility of every function across versions.

Upgrade planning has a concrete cost because recent versions require newer versions of major scientific libraries. A team should not treat `pip install --upgrade pingouin` as an isolated package update without checking NumPy, SciPy, Pandas, Matplotlib, Seaborn, Scikit-learn, Statsmodels, and the Python version. The documented upgrade command is:

```bash
uv pip install --upgrade pingouin
```

For production analysis, record the resolved environment and review release notes for changed output fields, methods, or dependency floors. The repository includes tests and documentation directories, which support verification, but the README does not provide a formal migration policy for every release.

## Pingouin limitations and a lower-level SciPy alternative

Pingouin is a poor fit when the requirement is merely a test statistic and p-value with minimal dependency overhead, because the package installs several scientific libraries and returns several additional metrics. It may also be unsuitable in environments limited to Python versions below 3.11 or versions of NumPy, SciPy, Pandas, Matplotlib, Seaborn, or Scikit-learn below the declared minimums. Function-level availability also varies: Statsmodels and Mpmath remain optional.

A genuine alternative is to call SciPy directly and add only the output an analysis requires. For an independent-samples test, SciPy's low-level routine follows the narrow reporting model described in the README, returning the T-value and p-value. This approach offers tighter control over the reporting surface and avoids installing Pingouin's full set of core dependencies, but it makes multi-metric reports more of a composition task.

Pingouin offers the better fit when repeated use of effect sizes, confidence intervals, power, Bayes Factors, correlations, and ANOVA reporting is central to the work. SciPy's lower-level route offers the better fit when dependency control or a minimal function-level API matters more. Neither approach removes assumptions about sampling, independence, distribution, or model specification. Pingouin simply exposes more of those reported quantities through its own API.

## Conclusion

Researchers already working with Python 3.11 and Pandas should consider Pingouin when they want a compact report containing estimates, uncertainty, effect sizes, and related measures from one API. Users who need only a conventional test result, cannot accept the stated dependency floor, or require a documented workflow absent from the API documentation should keep their scope narrower. Before adoption, verify the relevant function in the API documentation, decide whether `pingouin[extras]` is required, and confirm that the returned effect size, interval, and Bayes Factor match the intended statistical model. Pingouin is most suitable when those project-specific checks line up.

## FAQ

### How do I install Pingouin in Python?

The README documents installation with `pip install pingouin`, `uv pip install pingouin`, or `conda install -c conda-forge pingouin`. Pingouin requires Python 3.11 or later.

### What does Pingouin return for a t-test?

The README states that `pg.ttest` returns the T-value, p-value, degrees of freedom, Cohen's d, a 95% confidence interval, statistical power, and BF10.

### Does Pingouin require Statsmodels for every analysis?

No. Statsmodels is an optional dependency used for ANCOVA, `rm_corr`, and `anova` with unbalanced or N-way designs. Install the extras group when those functions are needed.

## Sources

- [License: GPL-3.0](https://github.com/raphaelvallat/pingouin/blob/main/LICENSE)
- [Project website](https://pingouin-stats.org/)
- [raphaelvallat/pingouin on GitHub](https://github.com/raphaelvallat/pingouin)
- [README](https://github.com/raphaelvallat/pingouin/blob/main/README.md)
- [Releases](https://github.com/raphaelvallat/pingouin/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/raphaelvallat-pingouin
