Skip to content

Commit 70167ac

Browse files
committed
Readme cleaned
1 parent 2537ba4 commit 70167ac

1 file changed

Lines changed: 24 additions & 11 deletions

File tree

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
[![License](https://img.shields.io/pypi/l/percentify.svg?style=flat&color=orange)](LICENSE)
77
[![Build Status](https://github.com/data-centt/percentify/actions/workflows/python-app.yml/badge.svg)](https://github.com/data-centt/percentify/actions/workflows/python-app.yml)
88

9-
**Percentify** brings the everyday data-science checks to your doorstep — one import, one line.
9+
**Percentify — a niche data science library for practitioners and learners alike, drawing its main dependencies from pandas and numpy, and including everyday statistics.**
1010

11-
Stop digging through scipy, statsmodels, and sklearn for the operations you run on every dataset. Percentify surfaces the common answer — the one 80% of practitioners actually want — as a single readable function call. Need to go deeper? The underlying libraries are still right there.
11+
Following the **Pareto principle**, Percentify brings the 20% of operations that make up 80% of daily data work to the forefront — each as a single, readable function call. No more digging through six-line recipes and hard-to-remember import paths for the checks you run on every dataset.
12+
13+
Percentify **does not aim to compete** with pandas, scipy, statsmodels, or scikit-learn — it stands on their shoulders and works *alongside* them. The goal is to make the core concepts easy to learn, quick to use, and simple to remember. Every function names the underlying library it draws from, so the moment you need the full, configurable version, you know exactly where to go.
1214

1315
Every function takes a pandas `DataFrame` (or `Series`) and hands back a clean `DataFrame` you can read, sort, or feed straight into the next step.
1416

@@ -27,23 +29,25 @@ Requires `numpy` and `pandas`.
2729

2830
### `change` — Percentage Change
2931
Two numbers, two columns, or a whole series at once.
32+
> _Underlying library:_ `pandas.DataFrame.pct_change`
3033
```python
3134
from percentify import change
3235

33-
change(100, 150) # → 50.0 (a 50% increase)
36+
change(100, 150) # → 50.0 (a 50% increase)
3437

3538
change(df["forecast"], df["actual"]) # element-wise % change between two columns
3639

37-
change(df["revenue"]) # period-over-period % change down the column
40+
change(df["revenue"]) # period-over-period % change down the column
3841
# 0 NaN
3942
# 1 50.0
4043
# 2 -40.0
4144

42-
change(df) # every numeric column at once
45+
change(df) # every numeric column at once
4346
```
4447

4548
### `vif` — Variance Inflation Factor (Multicollinearity)
46-
Buried in `statsmodels.stats.outliers_influence` behind a six-line loop. One call here.
49+
The classic multicollinearity check, without the six-line loop.
50+
> _Underlying library:_ `statsmodels.stats.outliers_influence.variance_inflation_factor`
4751
```python
4852
from percentify import vif
4953

@@ -58,6 +62,7 @@ vif(df, flag=5.0) # only rows above the threshold (your problem columns)
5862

5963
### `missing` — Missing Data Profiling
6064
No more `df.isnull().sum() / len(df) * 100`.
65+
> _Underlying library:_ `pandas.DataFrame.isna`
6166
```python
6267
from percentify import missing
6368

@@ -69,7 +74,8 @@ missing(df)
6974
```
7075

7176
### `cv` — Coefficient of Variation
72-
Not built in anywhere — instead of `df.std() / df.mean() * 100`.
77+
Relative variability (std ÷ mean), as a percentage.
78+
> _Underlying library:_ `scipy.stats.variation`
7379
```python
7480
from percentify import cv
7581

@@ -79,6 +85,7 @@ cv(df) # → DataFrame of every numeric column, most variable first
7985

8086
### `outliers` — Percentage of Outliers (IQR Method)
8187
Stop rewriting the IQR bounds from scratch.
88+
> _Underlying library:_ `scipy.stats.iqr`
8289
```python
8390
from percentify import outliers
8491

@@ -92,11 +99,13 @@ from percentify import r_squared
9299

93100
r_squared(y_true, y_pred) # → 87.3
94101
```
102+
> _Underlying library:_ `sklearn.metrics.r2_score`
95103
96104
### `pca_variance` — PCA Variance Breakdown
97105
Columns are standardized by default, so a feature measured in large units (e.g.
98106
dollars) can't dominate the result just because of its scale. Pass
99107
`standardize=False` for covariance-based PCA on the raw values.
108+
> _Underlying library:_ `sklearn.decomposition.PCA` (`.explained_variance_ratio_`)
100109
```python
101110
from percentify import pca_variance
102111

@@ -131,11 +140,15 @@ warnings.filterwarnings("ignore", category=PercentifyWarning)
131140

132141
## 🤝 Contributing
133142

134-
Contributions are welcome!
135-
- If you have an idea (extra helpers, bug fixes or an idea):
136-
- Fork this repo
143+
Contributions are welcome — but they must follow the repo's guiding principle:
144+
145+
> **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.
146+
147+
If your idea keeps things that simple and direct:
148+
- Open an issue first to discuss it
149+
- Fork the repo
137150
- Create a branch
138151
- Commit your changes
139152
- Open a pull request
140153

141-
I try to keep it within scope, so please open an issue to discuss big new features first.
154+
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.

0 commit comments

Comments
 (0)