Skip to main content

A library to detect and remove outliers using IQR.

Project description

IQR Outlier Detection Library

This Python package helps in detecting and removing outliers from a dataset using the Interquartile Range (IQR) method.

Features

  • Detects outliers using IQR.
  • Removes outliers from a dataset.
  • Works with Pandas DataFrames and Series.

Installation

pip install iqr-outlier

Import the package:

from iqr_outlier.detection import detect_outliers # Returns list with outliers
from iqr_outlier.removal import remove_outliers # Return a pandas series with outliers removed
import pandas as pd

Example

# Sample dataset
data = pd.Series([10, 12, 14, 15, 18, 20, 22, 24, 30, 100])

# Detect outliers
outliers = detect_outliers(data)
print("Outliers:", outliers.tolist())

# Remove outliers
cleaned_data = remove_outliers(data)
print("Cleaned Data:", cleaned_data.tolist())

Project Structure

iqr_outliers/
│-- iqr_outlier/
│   │-- __init__.py
│   │-- detection.py
│   │-- removal.py
│-- setup.py
│-- test.py
│-- README.md

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

iqr_outlier-0.1.5.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

iqr_outlier-0.1.5-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file iqr_outlier-0.1.5.tar.gz.

File metadata

  • Download URL: iqr_outlier-0.1.5.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for iqr_outlier-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a3572864213264e6fbe115d77bb18e8c70b95c7dc3d1f93870d67a9b40cb7c4f
MD5 8a6c85aba7932e8ff20dd02656fb6b47
BLAKE2b-256 dc7696d6ea0e335e31a7ebe30ab5d268edafb3a57d083b6a0cc9ef8649b51c4f

See more details on using hashes here.

File details

Details for the file iqr_outlier-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: iqr_outlier-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for iqr_outlier-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8529f372560f46fbeb578d047ccde66ec5af37ada9de8e5228a7857cdd3a9b07
MD5 509c84fc383844a0c2fb903bf845f115
BLAKE2b-256 4ea250f9096d342631875910c5bc149a2e23b0684208fc2213ef4952ee5306b6

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