Outlier Tool
A beginner-friendly Python package for detecting and handling numeric outliers using the IQR and Z-score methods.
Installation
From a wheel file (any device):
python -m pip install outlier_tool_shashikant-0.1.0-py3-none-any.whl
From GitHub:
python -m pip install git+https://github.com/YOUR_USERNAME/outlier-tool.git
Quick start
import pandas as pd
from outlier_tool import Outliers
df = pd.read_csv("data.csv")
o = Outliers(df) # or Outliers(df, columns=["price", "age"])
print(o.find("iqr")) # summary table
print(o.find("zscore"))
df1 = o.iqr_trim() # remove rows
df2 = o.iqr_cap() # cap values
df3 = o.zscore_trim(limit=3)
df4 = o.zscore_cap(limit=2.5)
df5 = o.replace_with_mean("iqr")
df6 = o.replace_with_median("zscore")
Methods
| Method | Purpose |
|---|---|
find(method, threshold) |
Summary of outliers per column |
iqr_trim(factor=1.5) |
Remove rows with IQR outliers |
iqr_cap(factor=1.5) |
Cap values at IQR limits |
zscore_trim(limit=3) |
Remove rows with Z-score outliers |
zscore_cap(limit=3) |
Cap values at Z-score limits |
replace_with_mean(method, threshold) |
Replace outliers with the mean of non-outliers |
replace_with_median(method, threshold) |
Replace outliers with the median of non-outliers |
Important notes
- Outliers are not always errors. Look at them before removing them.
- Trimming removes the whole row if any checked column has an outlier.
- Every method returns a new DataFrame; your original data is unchanged.
- Missing values (NaN) are never flagged as outliers.
- Constant columns (std = 0) are skipped by the Z-score method.
- For machine learning, calculate limits on training data only.
License
MIT
Metadata
Release files for outlier-tool-shashikant 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| outlier_tool_shashikant-0.1.0.tar.gz | 4.1 kB | With provenance | Details for outlier_tool_shashikant-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| outlier_tool_shashikant-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for outlier_tool_shashikant-0.1.0-py3-none-any.whl |
Total release size: 7.9 kB
Release files / outlier_tool_shashikant-0.1.0.tar.gz
| Download URL | outlier_tool_shashikant-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6241d8fb257b7c1a312fc0e496c6af6ee866427b275024e90534c71fce3c61cf
|
|
BLAKE2b-256 checksum How to use checksums |
d4fbbaa704c8b87cec746fb6b17fa05b7f06f90647c43efb9734ed19ac5a1f59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / outlier_tool_shashikant-0.1.0-py3-none-any.whl
| Download URL | outlier_tool_shashikant-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51dbe93ff18505fb2feca9400fe1e9ae53d0ea63ff9b2d528471ef5e6041a9b2
|
|
BLAKE2b-256 checksum How to use checksums |
1b5f2c23c17b3818585ceefcad91fcd0224250475cf5424a42c042ab79a684b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logSecurity for outlier-tool-shashikant 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for outlier_tool_shashikant-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.