Polarscope turns a Polars DataFrame or LazyFrame into one beautiful, information-dense table: summary stats, distribution nanoplots, outliers, normality tests and correlations. LazyFrames are streamed, never collected. No Pandas required.
pip install polarscope
156 rows ร 12 columns ยท 6 shown ยท generated with ps.xray(df, expanded=True)
| Column | Type | Missing | Distribution | Mean |
|---|---|---|---|---|
| Survived | i64 | 0% |
||
| Pclass | i64 | 0% |
||
| Age | f64 | 19.2% |
||
| Fare | f64 | 0% |
||
| Sex | str | 0% |
||
| Embarked | str | 0.6% |
Why Polarscope
One function call. Six kinds of insight. Rendered as a table you'll actually want to look at.
Pass pl.scan_parquet(...) or any lazy query straight to xray(). It streams the data instead of collecting it, so memory stays flat however many rows there are. Need exact quartiles? exact=True reads one column at a time, and a built-in memory guard never lets a summary outgrow your machine.
Streaming xray(lf, include="all") on a 12-column Parquet dataset that needs about 19 GB as a DataFrame.
xray()Summary statistics for every column by default, or include="all" for mixed types โ all in a single inspection table.
Flip expanded=True for normality & uniformity tests, outlier metrics, usability flags and correlation details.
Beautiful tables with histogram nanoplots and data bars โ or pass great_tables=False to get a plain Polars DataFrame.
Core data handling is implemented entirely in Polars. Fast, typed, and no Pandas required.
clean_column_names, convert_datatypes and drop_missing to tidy frames before you analyze them.
Correlation, missing-value, distribution and categorical plots โ plus built-in titanic and diabetes datasets to play with.
Quick start
corr_targetimport polars as pl
import polarscope as ps
from polarscope.datasets import titanic
# load a built-in dataset (or your own)
df = titanic()
# the whole library, in one call
ps.xray(df)
# bigger than memory? pass a LazyFrame, nothing is collected
ps.xray(pl.scan_parquet("events/*.parquet"))
# go deeper: tests, outliers, correlations
ps.xray(
df,
expanded=True,
corr_target="Survived",
outlier_method="iqr",
)
Free, open source and MIT licensed. pip install polarscope