Great Tables in Python: Make Publication-Quality Tables
Turn a DataFrame into a polished table with Great Tables: titles, number formats, column groups, colored cells, inline sparklines and PNG export.
Turn a DataFrame into a polished table with Great Tables: titles, number formats, column groups, colored cells, inline sparklines and PNG export.
Draw sparklines with Matplotlib: a stack of tiny line charts with last values, min and max markers, reference bands, a grid of small multiples and inline PNGs for HTML tables.
Turn a from-to table into a chord diagram with pyCirclize, add direction arrows, set colors, highlight one group and know when a heatmap is clearer.
Build a Marimekko chart with variable-width Matplotlib bars, label it, and make mosaic plots of categorical data with statsmodels.
Draw a forest plot of odds ratios with Matplotlib, pool studies with fixed and random effects, and add the table columns journals expect.
Compare two measurement methods with a Bland-Altman plot: mean difference, limits of agreement, confidence intervals and what to do when the spread grows with size.
Draw bullet charts with layered Matplotlib bars to compare a value with a target and performance bands, for one KPI or a whole stack.
Plot every data point without overlap using sns.swarmplot, fix the "points cannot be placed" warning, and combine beeswarms with groups, color and summaries.
Draw stream graphs with stackplot, compare the four baseline options, smooth the layers and label them directly.
Build a bubble chart with ax.scatter, scale bubble areas correctly, color by group, add a size legend and label the points.
Fit a Bayesian marketing mix model with PyMC-Marketing, check it, and chart channel contributions, return on ad spend, response curves and a reallocated budget.
Measure a regional ad campaign with a geo-lift test in Python: build a synthetic control, estimate lift and return on ad spend, run placebo tests, and plan test length with a power analysis.
Use DoWhy's four steps (model, identify, estimate, refute) on a worked example, chart the results, and learn what the refutation tests can't catch.
Draw clean causal diagrams with NetworkX and Matplotlib, list backdoor paths, choose adjustment variables, and see what controlling for a collider does.
Find the customers a campaign actually persuades: build T-, S- and class-transformation uplift models with scikit-learn and evaluate them with a Qini curve.
Estimate how a treatment effect differs from customer to customer with a causal forest in EconML, then plot the effects, check them, and turn them into a targeting rule.
Compare all numeric columns at once with pandas scatter_matrix: KDE diagonals, colors by category, readable labels, correlations, and a lower-triangle layout.
Plot a moving average with rolling().mean() and ewm(): window sizes, centered and time-based windows, gaps, rolling median, standard deviation bands, and groups.
Turn groupby() and pivot_table() results into bar, line, and small multiple charts, using unstack(), ordered categories, error bars, and monthly dates.
Draw histograms and box plots straight from a DataFrame with df.hist(), df.plot.hist(), df.boxplot(), and df.plot.box(), including one chart per group.