Metadata-Version: 2.4
Name: polars-profiling
Version: 0.2.0
Summary: Generate a profile report for a Polars DataFrame
Author: polars-profiling contributors
Project-URL: Homepage, https://pytoned.github.io/polars-profiling/
Project-URL: Repository, https://github.com/pytoned/polars-profiling
Project-URL: Issues, https://github.com/pytoned/polars-profiling/issues
Keywords: polars,data-science,data-analysis,python,jupyter,ipython
Classifier: Development Status :: 5 - Production/Stable
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Healthcare Industry
Classifier: Topic :: Scientific/Engineering
Classifier: Framework :: IPython
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: polars<2,>=1.0
Requires-Dist: scipy>=1.8
Requires-Dist: matplotlib>=3.5
Requires-Dist: pydantic<3,>=2
Requires-Dist: PyYAML>=6.0
Requires-Dist: jinja2>=3.1
Requires-Dist: numpy>=1.22
Requires-Dist: minify-html>=0.15.0
Requires-Dist: filetype>=1.0.0
Requires-Dist: requests<3,>=2.32.0
Requires-Dist: tqdm<5,>=4.66.3
Requires-Dist: multimethod<2,>=1.4
Requires-Dist: typeguard<5,>=4
Requires-Dist: imagehash>=4.3
Requires-Dist: wordcloud>=1.9.4
Requires-Dist: dacite<2,>=1.9
Provides-Extra: dev
Requires-Dist: black>=22.0; extra == "dev"
Requires-Dist: isort>=5.0.7; extra == "dev"
Requires-Dist: pre-commit>=2.8.2; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: notebook
Requires-Dist: jupyter>=1.0.0; extra == "notebook"
Requires-Dist: ipywidgets>=7.5.1; extra == "notebook"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: build; extra == "test"
Requires-Dist: twine; extra == "test"
Dynamic: license-file

# polars-profiling

<p align="center">
  <strong>Profile your <a href="https://pola.rs">Polars</a> DataFrames with a single line of code.</strong>
</p>

<p align="center">
  <a href="https://github.com/pytoned/polars-profiling/actions/workflows/tests.yml"><img alt="Build" src="https://github.com/pytoned/polars-profiling/actions/workflows/tests.yml/badge.svg"></a>
  <a href="https://pypi.org/project/polars-profiling/"><img alt="PyPI" src="https://img.shields.io/pypi/v/polars-profiling?color=blue&label=pypi"></a>
  <a href="https://github.com/pytoned/polars-profiling/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
  <img alt="Python" src="https://img.shields.io/badge/python-3.10%2B-blue.svg">
  <img alt="Polars only" src="https://img.shields.io/badge/engine-polars--only-orange.svg">
</p>

`polars-profiling` generates a rich, interactive **HTML exploratory-data-analysis
report** from a Polars `DataFrame`. It is a fork of
[ydata-profiling](https://github.com/ydataai/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

```bash
pip install polars-profiling
```

## Quickstart

```python
import polars as pl
from polars_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:

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

### In a Jupyter notebook

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

### Get the raw statistics (no HTML)

```python
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.
- **Correlations** — `auto`, 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:

```python
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

```python
from polars_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](LICENSE). This project builds on the work of
ydata-profiling and pandas-profiling.
