Skip to main content

Data Exploratory stats and Quality diagnostics for pandas and Polars DataFrames. One easy call each.

Project description

Percentify logo

PyPI version Python Versions License Docs Build Status Polars

80% of the checks you run on every dataset. 20% of the code.

Exploratory stats and data-quality diagnostics for pandas and Polars DataFrames. One call each.

[!TIP] ⚡ Polars is first-class, not an afterthought. Pass a Polars DataFrame or Series and get the same kind straight back, with no flag and no manual conversion. Every function works on both backends, which is what sets Percentify apart from the pandas-only tools.

Where a function wraps an existing library (pandas, scipy, statsmodels, scikit-learn), it names it, so you always know where to dig deeper.

⭐ The flagship: profiler

pandas .describe() tells you what your data is. profiler() tells you what to do about it: every issue ranked worst-first, each with its fix.

from percentify import profiler

report = profiler(df, target="churn")

report.to_frame()          # every finding, ranked worst-first, with a suggested fix
report.errors              # just the blocking issues
report.health              # a 0 to 100 data-health score
assert not report.errors   # drop it straight into a CI data-quality gate

Point it at any messy DataFrame, pandas or Polars, and see what it flags before you model. Try it on your own data →

📖 Documentation

Full guide, every function, and live examples → data-centt.github.io/percentify

📦 Installation

pip install percentify

Requires Python 3.10+, numpy, and pandas 2.0+.

Quick example

import pandas as pd
from percentify import missing

df = pd.DataFrame({
    "salary": [50000, None, 60000, None],
    "age":    [25, 30, None, 40],
    "city":   ["NY", "LA", "SF", "LA"],
})

missing(df)
#    column  missing_pct
# 0  salary         50.0
# 1     age         25.0
# 2    city          0.0

One import, one line. A clean, sorted DataFrame you can read or feed into the next step.

What's inside

Function What it answers
profiler What is wrong with this dataset, and how do I fix it?
change Growth as numbers, columns, or a whole series
vif Which features are collinear?
missing How much of each column is missing?
cv How variable is each column, relative to its mean?
outliers What percentage of each column are outliers?
pca_variance How much variance does each principal component explain?
pca_loadings What does each principal component consist of?
imbalance How skewed are the classes in a target column?
correlate Which features move together, and is it significant?
skew_report How skewed is each column, and what transform helps?
bootstrap_ci What is the confidence interval for a statistic?
permutation_test Are two groups really different? (a p-value)
effect_size How big is the difference, not just whether it is significant?
difference How far apart are two values or columns?
split How does a total divide across weights or groups?
display Format numbers or a column as clean "%" strings

→ See the documentation for a worked, real-output example of every function.

🛟 Friendly by design

  • No cryptic tracebacks; Hand a function a text column where numbers are needed and you get a clear PercentifyWarning, not an Arrow/NumPy stack trace.
  • Sensible defaults; Results come back sorted worst-first, and PCA is standardized out of the box.
  • DataFrames everywhere; so the output drops straight into your notebook, your next filter, or your model.
  • Pandas or polars; pass either a pandas or polars object and you get the same kind back, no flag needed.

🤝 Contributing

Contributions are welcome but they must follow the repo's guiding principle:

Keep each method as direct-to-output as possible. A percentify function should return the single most common answer in one line, and point users to the underlying library (pandas, scipy, statsmodels, scikit-learn) for the full, configurable version when the simplest output isn't what they're after.

It must support polars. Every function accepts both pandas and polars objects (via the @_backend_aware decorator) and returns the same kind, so any new contribution must keep that parity.

If your idea keeps things that simple and direct:

  • Open an issue first to discuss it
  • Fork the repo
  • Create a branch
  • Commit your changes
  • Open a pull request

Anything that adds knobs and options for their own sake, or duplicates what the parent libraries already do well, is out of scope; those cases should point to the source library instead. I try to keep it compact on purpose, to discuss big new features first.

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

percentify-1.0.2.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

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

percentify-1.0.2-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file percentify-1.0.2.tar.gz.

File metadata

  • Download URL: percentify-1.0.2.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for percentify-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7a098d583fb25b7109c2e30db33c9ebced6d5af8421afc27d7e4905e0dc326bd
MD5 0342a9e1f2b0d2a91b6df165c792a6db
BLAKE2b-256 cfd1bc8b591b40be3e3da6868fea6e684208ca38869fd107e3b66a74fb7e1722

See more details on using hashes here.

File details

Details for the file percentify-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: percentify-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for percentify-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f886fb15c67f0374daedf26c61a9188022c93c0b3faca56d181944e17c3a548
MD5 fabbb70ca15687cf83b2457b700471a5
BLAKE2b-256 d33d4e18376ca8a395ddcdcc48a322db076f48711e8fc8a53a2f31e173b7a5f1

See more details on using hashes here.

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