Statistics in Python, done right · DataFrame outputs · effect sizes + power + Bayes · verified against Pingouin 0.6.x (2026)

Pingouin cheat sheet

Pingouin is a statistics package built on pandas/NumPy that gives you the whole answer, not just a p-value: every test returns a tidy DataFrame with the statistic, exact p, degrees of freedom, effect size, confidence intervals, statistical power, and often a Bayes factor. It fills SciPy's gaps — repeated-measures & mixed ANOVA, partial correlation, post-hoc pairwise tests, mediation, and assumption checks — with one consistent API. Targets Pingouin 0.6.x, Python 3.10+.

setup & idea group differences ANOVA / regression correlation assumptions / power / plots gotcha most common

Verified 2026-08-31 against the official docs at pingouin-stats.org (Pingouin 0.6.1, released 2026-03-28; Python 3.10–3.14). Every function returns a pandas DataFrame; most take a tidy (long-format) DataFrame with dv, within/between, and subject columns.

Outline

Pick the test for your design; Pingouin returns a full DataFrame every time. Check assumptions, read the effect size, and report power — not just p<.05.

Getting started

  1. 1Install & the idea

Group differences

  1. 2T-tests
  2. 3Non-parametric tests
  3. 4Pairwise & post-hoc

ANOVA & regression

  1. 5ANOVA family
  2. 6ANCOVA & regression

Correlation

  1. 7Correlation
  2. 8Partial & matrix correlation
  3. 9Mediation & contingency

Assumptions & extras

  1. 10Assumption checks
  2. 11Effect size & power
  3. 12Plotting & extras

Getting Started

One import, tidy DataFrames in, rich DataFrames out.

1Install & the ideapip / philosophy

Group Differences

Compare means or distributions — parametric and non-parametric, with post-hoc.

2T-teststwo groups
3Non-parametric testsno normality
4Pairwise & post-hocwhich pairs differ

ANOVA & Regression

Every ANOVA design in one namespace, plus linear/logistic regression with full stats.

5ANOVA family3+ groups
6ANCOVA & regressionwith covariates

Correlation

Robust, partial, and matrix correlations with the assumptions handled.

7Correlationtwo variables
8Partial & matrix correlationcontrol for covariates
9Mediation & contingencyindirect effects

Assumptions, Power & Plots

Test the assumptions behind your test, size your study, and visualize.

10Assumption checksbefore you trust it
11Effect size & powerbeyond p
12Plotting & extrasvisualize

Worth memorizing

import pingouin as pgevery function returns a DataFrame
pg.ttestT, p, CI, cohen-d, power, BF10 in one row
paired=Truethe switch between related / independent
rm_anova / mixed_anovawhat SciPy can't do
pairwise_testspost-hoc + padjust (bonf/holm/fdr_bh)
pg.corrmethod= spearman/bicor/... robust options
partial_corrcorrelation controlling for covar=
tidy/long formatdv + within/between + subject columns
normality / homoscedasticityp<.05 = assumption violated
compute_effsizecohen / hedges / CLES
power_ttestset one arg None -> solves for it
df.rcorr()correlation matrix with sig stars