Skip to main content

Generate a profile report for a Polars DataFrame

Project description

polars-profiling

Profile your Polars DataFrames with a single line of code.

Build PyPI License Python Polars only

polars-profiling generates a rich, interactive HTML exploratory-data-analysis report from a Polars DataFrame. It is a fork of ydata-profiling (formerly pandas-profiling) rebuilt to run exclusively on Polars — pandas, Spark, and visions have been removed entirely, and every statistic is computed natively with Polars expressions.

For each column you get type detection, descriptive statistics, quantiles, histograms, common/extreme values, correlations, missing-value diagnostics, interactions, duplicate-row detection, samples, and automatic data-quality alerts.


Why Polars-only?

ydata-profiling polars-profiling
Input pandas / Spark Polars
Compute engine pandas / numpy native Polars expressions
Heavy dependencies pandas, visions, seaborn, statsmodels, phik none of them
Telemetry phones home none

The full data path — value counts, distinct/unique, numeric statistics, quantiles, histograms, correlations, missing-data nullity, duplicates and sampling — runs through Polars. There is no .to_pandas() anywhere in the pipeline.

Installation

pip install polars-profiling

Quickstart

import polars as pl
from data_profiling import ProfileReport

df = pl.read_csv("titanic.csv")

profile = ProfileReport(df, title="Titanic Dataset", explorative=True)
profile.to_file("titanic_report.html")

Or use the DataFrame accessor:

df.profile_report().to_file("report.html")

In a Jupyter notebook

profile = ProfileReport(df, title="Profiling Report")
profile.to_notebook_iframe()

Get the raw statistics (no HTML)

description = ProfileReport(df, progress_bar=False).get_description()
print(description.table["types"])      # {'Numeric': 7, 'Text': 3, 'Categorical': 2}
print(description.variables["Age"]["mean"])

Features

  • Type inference — Numeric, Categorical, Boolean, DateTime, Text (with configurable, content-based inference for string columns).
  • Univariate statistics — count, distinct/unique, missing, mean, std, variance, min/max, quantiles, MAD, skewness, kurtosis, monotonicity, zeros, negatives, infinities.
  • Histograms & frequency tables, common and extreme values.
  • Correlationsauto, Pearson, Spearman, Kendall and Cramér's V, computed natively.
  • Missing-value diagnostics — count bar, nullity matrix and correlation heatmap.
  • Interactions — pairwise scatter plots between continuous variables.
  • Duplicate-row detection and head/tail/random samples.
  • Data-quality alerts — high correlation, high cardinality, imbalance, missing values, zeros, uniqueness, constants and more.
  • Report comparison — diff two datasets side by side.

Configuration

ProfileReport accepts a familiar set of keyword arguments. A few common ones:

ProfileReport(
    df,
    title="My Report",
    minimal=True,              # faster, fewer computations
    explorative=True,          # enable extra analyses
    correlations={"pearson": {"calculate": True}},
    missing_diagrams={"heatmap": False},
    samples={"head": 5, "tail": 5},
    type_schema={"col": "categorical"},  # override inferred types
    progress_bar=False,
)

Comparing two reports

from data_profiling import compare

report_a = ProfileReport(df_a, title="A")
report_b = ProfileReport(df_b, title="B")
compare([report_a, report_b]).to_file("comparison.html")

Differences from ydata-profiling

  • Input must be a Polars DataFrame (pandas/Spark are not accepted).
  • phi_k correlation is not available (it is a pandas-only package); the other correlation methods are reimplemented natively.
  • The Great Expectations export converts to pandas at that single boundary only (and requires the optional great_expectations package, which itself depends on pandas).
  • No telemetry is collected or sent.

License

MIT — see LICENSE. This project builds on the work of ydata-profiling and pandas-profiling.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polars_profiling-0.1.0.tar.gz (3.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polars_profiling-0.1.0-py2.py3-none-any.whl (366.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file polars_profiling-0.1.0.tar.gz.

File metadata

  • Download URL: polars_profiling-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for polars_profiling-0.1.0.tar.gz
Algorithm Hash digest
SHA256 903255ae42d7e943742eafe1ddf096e5737c50dc2198b1a1a938729447be623a
MD5 9b17c8cc86479f7e391339bffcd13f6d
BLAKE2b-256 05096e727a67a1696c536ba4f3c6178b1e466bd85625d4dbbf0d4616947860c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_profiling-0.1.0.tar.gz:

Publisher: publish-pypi.yml on pytoned/polars-profiling

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polars_profiling-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for polars_profiling-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a3aba73078354608b020d18bae1f0c96311debad4b3d6eacf9a96b121a43ee8
MD5 0f575791e4f5d503d6ebcf51ae84ab46
BLAKE2b-256 7e58d1be4aa89c7f161b6144f27ba5b55a319e6f559fe3dae76831cb47e0969e

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_profiling-0.1.0-py2.py3-none-any.whl:

Publisher: publish-pypi.yml on pytoned/polars-profiling

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page