A Python library to add statistical annotations (e.g., p-value brackets) on existing boxplots/barplots generated by seaborn. Current version 0.2.3, supports Python >=3.5. Maintenance mode; last release in 2020.
pip install statannotVerified import paths — ran on the pinned version, not inferred.
Add statistical annotation (p-value brackets) to a seaborn boxplot.
Switch to statannotations: pip install statannotations, import from statannotations.
Ensure exact string matching of category names; use df['column'].unique() to verify.
Replace pvalue_format='star' with text_format='star'.
Use one of the supported tests: 't-test_ind', 't-test_paired', 'Mann-Whitney', 'Mann-Whitney-gt', 'Mann-Whitney-ls', 'Wilcoxon', 'Kruskal', 'ANOVA', 'Kruskal_Dunn'.
Use comparisons_correction=None or 'Bonferroni' only.