You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in contributing to Percentify! We welcome contributions, but ask that you follow the project's guiding principles to keep the library focused and simple.
4
+
5
+
## Guiding Principles
6
+
7
+
Percentify is built on the idea of simplicity and directness.
8
+
9
+
> 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.
10
+
11
+
-**No unnecessary knobs and options**: Anything that adds parameters for their own sake, or duplicates what the parent libraries already do well, is out of scope. For those cases, users should be pointed to the source library instead.
12
+
-**Keep it compact**: We try to keep the API surface compact on purpose. Please discuss big new features in an issue before writing code.
13
+
14
+
## Technical Requirements
15
+
16
+
**It must support Polars.**
17
+
Every function in Percentify accepts both pandas and Polars objects (via the `@_backend_aware` decorator) and returns the same kind. Any new contribution must maintain this parity. You should not require the user to manually convert between backends or pass specific flags.
18
+
19
+
## Contribution Workflow
20
+
21
+
If your idea keeps things simple, direct, and adheres to the principles above, here is how you can contribute:
22
+
23
+
1.**Discuss first**: Open an issue to discuss your proposed change or feature. This saves time and ensures your contribution aligns with the project's goals.
24
+
2.**Fork and Branch**: Fork the repository and create a new branch for your feature or bugfix.
25
+
3.**Develop**: Write your code, ensuring it supports both pandas and Polars.
26
+
4.**Test**: (Include any testing guidelines if applicable, e.g., using `pytest`).
27
+
5.**Commit and Push**: Commit your changes with clear, descriptive commit messages.
28
+
6.**Pull Request**: Open a pull request against the main branch. Reference the issue you opened in step 1.
@@ -19,7 +18,7 @@ Exploratory stats and data-quality diagnostics for pandas and **Polars** DataFra
19
18
20
19
Where a function wraps an existing library (pandas, scipy, statsmodels, scikit-learn), it names it, so you always know where to dig deeper.
21
20
22
-
## ⭐ The flagship:`profiler`
21
+
## ⭐ `profiler`
23
22
24
23
**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.
25
24
@@ -48,6 +47,17 @@ pip install percentify
48
47
49
48
Requires Python 3.10+, `numpy`, and `pandas` 2.0+.
50
49
50
+
## How to use percentify
51
+
52
+
Import the function that matches the question you want to answer, pass in a pandas or Polars object, and use the returned DataFrame or scalar directly in your notebook, report, or pipeline.
53
+
54
+
```python
55
+
from percentify import missing, profiler
56
+
57
+
missing(df) # quick column-level check
58
+
profiler(df, target="churn") # ranked data-quality issues and fixes
59
+
```
60
+
51
61
## Quick example
52
62
53
63
```python
@@ -69,6 +79,124 @@ missing(df)
69
79
70
80
One import, one line. A clean, sorted DataFrame you can read or feed into the next step.
71
81
82
+
## Examples
83
+
84
+
These are short, recipe-style examples that go beyond the one-liner above and are intentionally not covered in the [documentation](https://data-centt.github.io/percentify/documentation/). The docs show each function in isolation; these show how to chain them into a real workflow.
85
+
86
+
### A 30-second data-quality gate
87
+
88
+
Drop this into CI to block training on a dataset that isn't ready:
89
+
90
+
```python
91
+
import pandas as pd
92
+
from percentify import profiler
93
+
94
+
df = pd.read_parquet("train.parquet")
95
+
report = profiler(df, target="label")
96
+
97
+
assert report.errors.empty, report.to_frame()
98
+
assert report.health >=80, f"health too low: {report.health}"
99
+
```
100
+
101
+
### Rank correlations by significance
102
+
103
+
Pull the pairs that are both strong *and* unlikely to be noise:
@@ -114,6 +242,3 @@ If your idea keeps things that simple and direct:
114
242
- Create a branch
115
243
- Commit your changes
116
244
- Open a pull request
117
-
118
-
> 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.
119
-
I try to keep it compact on purpose, to discuss big new features first.
0 commit comments