A Beginner's Guide to A/B Testing for Data Scientists
A practical guide to A/B testing for data scientists: framing testable hypotheses, sizing samples, reading...
You inherit a dataset you have never seen. The request is vague: "tell me what's in it." Paid platforms will happily sell you an answer, but the free stack covers profiling, missing-value maps, quick charts and data contracts without a licence or a credit card. The real problem is choice — installing fifteen libraries and learning none of them.
This shortlist is built around that constraint. Three or four tools, learned properly, will handle almost every first pass on a new table.
Start with pandas and resist reaching for a library until the defaults stop answering your questions. In a fresh notebook, run shape and dtypes, then .info(), .describe(), .isna().sum(), .duplicated().sum() and .nunique() per column. Add value_counts(dropna=False) for categorical columns — the dropna=False part matters, because silent NaNs inside a category are one of the most common causes of a wrong conclusion.
If your data is larger than memory, Polars gives you null_count(), describe() and cheap lazy scans. DuckDB is worth knowing too: you can query a CSV or Parquet file directly with SQL and run its SUMMARIZE command to get types, ranges, uniqueness and a rough distribution for every column in one shot.
Wrap these calls into a single function in a personal utilities module. You will use it weekly.
ydata-profiling — the library formerly known as pandas-profiling — still produces the most complete one-liner report: distributions, correlations, missing-value counts, duplicate rows and a list of alerts. On wide data it gets slow, so pass a sample and switch on the minimal mode before you blame your laptop.
Sweetviz is the one to reach for when you are comparing two frames: train against test, this month against last, treated against control. It lines the distributions up side by side, which makes drift visible in seconds.
skimpy is the quiet option. It prints a compact summary to the console, which makes it a good fit for a terminal session or a CI log where an HTML file is useless.
DataPrep attracted a lot of attention for fast EDA and cleaning, but its maintenance has been uneven — check the repository's recent activity before you build a workflow on it.
Whatever report you generate, treat it as a starting point. The alerts flag things worth looking at; they do not tell you what a column means in your domain.
D-Tale starts a local web interface from a dataframe. You can filter, sort, describe, plot and export the equivalent pandas code — useful when someone is asking questions over your shoulder and you don't want to write a separate chart for every question.
PyGWalker puts a drag-and-drop, Tableau-style canvas inside a Jupyter cell. It reads pandas and Polars frames and is the fastest way to let a non-coder poke at the data themselves.
Lux is the automatic chart recommender: it detects column types and suggests plots as you display a dataframe. Development has slowed, but for a quick overview it still does its job.
One rule applies to all three: exploration is disposable. Once you find the chart that matters, rewrite it in plotting code so the finding is reproducible.
The temptation is to learn everything. Don't.
For exploratory charting, speed of iteration beats beauty. Draft with plotly express, fall back to seaborn when you are faceting across many categories, and reach for matplotlib only when a figure has to be presentation-ready.
JupyterLab remains the workhorse, and the VS Code Jupyter extension is close enough that many people never open the classic interface. marimo is the most interesting newer option: a reactive notebook stored as a plain Python file, where changing one cell reruns its dependents. That removes stale-state bugs and makes diffs readable in git.
For compute you don't own, Google Colab and Kaggle Notebooks both offer free tiers, and Kaggle's dataset hosting is convenient for public work. Quarto turns a notebook into a shareable HTML or PDF report with a single command. If you work across R and Python, Positron is a free IDE built for exactly that mix.
Hosted free tiers change their limits without much warning, so keep confidential or personal data out of them. And if you handle regulated or personal information, check your organization's policy first — the tools are free, the compliance work isn't.
Profiling finds problems; tests stop them coming back. Pandera lets you declare a schema for a dataframe — types, ranges, allowed categories — and check it in a few lines. Great Expectations offers a heavier framework with an open-source core, worth adopting once more than one person depends on the pipeline. cleanlab can surface likely label errors in supervised data.
Start small. Assert that a date column is never in the future, that an ID column is unique, and that a country column contains only values from a known set. Run those assertions in pytest. When the next file arrives, you will know within seconds whether it is usable.
Keep that routine in a template notebook with your utility function already imported at the top. The specific tools will keep shifting — a library slows down, a new notebook format shows up — but the habit of running a structured first pass is what actually compounds.
Photo: ckstockphoto / Pixabay
A practical guide to A/B testing for data scientists: framing testable hypotheses, sizing samples, reading...
A practical guide to pulling your city's open bike data, cleaning trip records without bias, and mapping...
A practical walkthrough of cleaning daily sales history, separating trend from holiday seasonality, and...