Skip to main content

Data Quality Check Library

Project description

DATA QUALITY

A library which acts as a test cases for dataframes. Simply pass in your dataframe after initial import, or at each stage of your EDA to check for data quality with one line of code.

The test cases include(as of now)

  1. check for null values
  2. check for duplicates
  3. check for dtype matching
  4. check for outliers

The test cases work as a Pass/Fail type, where Passed indicates, good data quality and Failed indicates bad data quality

Example:

TEST CASE FOR NULL VALUES: Passed means that the dataframe has no null values. Failed indicates otherwise.

Requirements

  • Python 3+
  • Pandas
  • Numpy

Installation

pip install data-quality-tests

Updates & Changes

  1. the import function changed from:
from data_quality import DataQuality

to the following:

from data_quality_tests import DataQuality
  1. new function outlier_columns has been added in this update, which displays all the columns that have outliers.
    For use case, refer to the get started section

Get Started

How to use this library:

Data quality check

The most basic usage of this library, here for simplifiction,
let's just se the iris dataset from seaborn library.

You can use any dataset.

from data_quality_tests import DataQuality as dq
import seaborn as sns

#declare any dataframe

df = sns.load_dataset("iris")

#pass the dataframe as below  

dq.data_quality_check(df)

Outlier columns

Sometimes, the test case for outliers fails, this is because the dataset containes outliers.

use outier_columns(df) function to display all the columns that have outliers.

NOTE If the dataset does not have outlier columns, the output is an empty list.

# display columns that have outliers
dq.outlier_columns(df)

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

data-quality-tests-0.1.5.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

data_quality_tests-0.1.5.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file data-quality-tests-0.1.5.1.tar.gz.

File metadata

  • Download URL: data-quality-tests-0.1.5.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for data-quality-tests-0.1.5.1.tar.gz
Algorithm Hash digest
SHA256 d3d3e720fac80b39f706370d386b106ca92edf27c53be629a9f83d07e35722b3
MD5 aeecde6c0f7a93a38c56e7f4b5c58eac
BLAKE2b-256 c1632ab7e811e17de6fc43d89ca8a5529b80b08f0f2380c9195b75894029bf8d

See more details on using hashes here.

File details

Details for the file data_quality_tests-0.1.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for data_quality_tests-0.1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 adbcff4096ccf0c53f142d09c623eb6f1a8ae2f35d17ccd9155bd349505f5ee9
MD5 2da45989e8887dd8e0dff22d5cc5f95c
BLAKE2b-256 18fb32896e082c2a0dd01ab33d60443f5aea2a7bd13203cf5cf47b1173466d60

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