Pingouin: How to Build a Statistical EDA Pipeline
Pingouin is a Python library for statistical analysis. With it, you can build a complete EDA pipeline that checks key properties of your data: distribution normality, correlations and outliers. That helps surface patterns early in your work with a dataset.
AI-processed from KDnuggets; edited by Hamidun News
Most analysts and data scientists start exploring data with visualization: they plot charts, look at distributions and compute basic statistics. That is a good start, but often not enough. Pingouin is a Python library that turns exploratory data analysis (EDA) into a systematic statistical process.
Why statistical EDA is critical
Visualization answers the questions "what do we see?" and "what does it look like?" But a reliable model needs more serious answers:
- Are the variables normally distributed?
- Are there significant correlations between features?
- Which variables are worth selecting for the model?
- Where are the outliers and anomalies hiding?
- Which statistical assumptions are violated?
Without these answers, the model will be brittle. At the EDA stage, it is easier to rebuild features or filter data than to retrain the model later.
What Pingouin can do
The library ships ready-made functions for the main statistical tests. Instead of recalling formulas or writing long blocks of pandas and scipy code, you call a single function. Key features:
- Normality tests (Shapiro-Wilk, Kolmogorov-Smirnov, Anderson-Darling) — check whether a distribution is normal
- Correlation analysis — computes Pearson, Spearman and Kendall coefficients with p-values
- Homogeneity of variance tests (Levene, Bartlett) — compare the spread of values across groups
- Outlier detection — IQR, Z-score and Mahalanobis methods
- ANOVA and post-hoc tests — analyze differences between groups
- Effect size (Cohen's d, eta-squared) — the practical significance of results
A typical EDA pipeline with Pingouin
The pipeline consists of sequential checks:
Loading and basic cleaning. Read the data, remove duplicates and handle missing values in a standard way.
Checking distributions. Call pg.normality() for each numeric variable. If p-value > 0.05, the variable is normal. If not, it needs a transformation (log, sqrt or Box-Cox).
Correlation analysis. Compute the correlation matrix with pg.corr() and identify significant relationships (p < 0.05). High correlations (> 0.9) point to multicollinearity.
Outlier detection. Apply several methods (IQR, Z-score) and compare the results. Outliers can be removed, set aside for separate analysis or handled with a transformation.
Checking model assumptions. If you plan to use linear regression, check homoscedasticity (homogeneity of error variances), the absence of multicollinearity and the linearity of relationships.
Documentation. Record which variables violate assumptions, which ones you excluded and why. This will help when you interpret the results.
"Good EDA is a dialogue with the data, not a monologue of pretty charts."
What this means
A tool like Pingouin democratizes access to statistical analysis. You no longer need to remember test names or hunt for the right one in the scipy documentation — a ready-made solution takes a few lines. It is especially useful in the early stages of a project, when you need to quickly understand what data you are dealing with and which preparatory steps you will need.
- Aug 29, 2026How to Build a Stable Pipeline on the Fable 5 Traces Dataset in Google Colab
- Jul 1, 2026Docling Parse: A PDF Parsing Pipeline Accurate to the Character and Coordinate
- Nov 26, 2026Karpathy's Claude Code Built a Civilization-Style Map of the US in 7 Hours
- May 27, 2026Langfuse for LLM Engineers: A Full Tracing and Experimentation Pipeline
Key Questions Answered
Why statistical EDA is critical?
Visualization answers the questions "what do we see?" and "what does it look like?" But a reliable model needs more serious answers: Are the variables normally distributed? Are there significant correlations between features? Which variables are worth selecting for the model? Where are the outliers and anomalies hiding? Which statistical assumptions are violated? Without these answers, the model will be brittle. At the EDA stage, it is easier to rebuild features or filter data than to retrain the model later.
What Pingouin can do?
The library ships ready-made functions for the main statistical tests. Instead of recalling formulas or writing long blocks of pandas and scipy code, you call a single function. Key features: Normality tests (Shapiro-Wilk, Kolmogorov-Smirnov, Anderson-Darling) — check whether a distribution is normal Correlation analysis — computes Pearson, Spearman and Kendall coefficients with p-values Homogeneity of variance tests (Levene, Bartlett) — compare the spread of values across groups Outlier…
What are the key details on A typical EDA pipeline with Pingouin?
The pipeline consists of sequential checks: Loading and basic cleaning. Read the data, remove duplicates and handle missing values in a standard way. Checking distributions. Call pg.normality() for each numeric variable. If p-value > 0.05, the variable is normal. If not, it needs a transformation (log, sqrt or Box-Cox). Correlation analysis. Compute the correlation matrix with pg.corr() and identify significant relationships (p < 0.05). High correlations (> 0.9) point to multicollinearity. Outlier detection.
Ship AI Faster with Founders, Engineers & Weekly Architecture Reviews
Inside Vibe Club (hamidun.com/club) — weekly live masterminds with Zhemal Khamidun, Tech Radar, full LMS access, and 370+ production Claude Code skills.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
