Skip to main content

Dataset cleaning library

Project description

DATASET CLEANING LIBRARY

Table of Contents

General Information

This code identifies null percentages per column, removes columns with nulls exceeding a specified threshold and fills missing values. It also analyzes column distribution using skewness and can show a graph to see how the distribution looks like.

The purpose of the project is to optimize the process of cleaning dataset as it minimizes data loss and enchances data quality as well as gives the opportunity to decide how to fill the missing values.

This project is undertaken in order to create a reliable data cleaning library that standardizes the preparation or preprocessing of datasets. It has an educational value since it is done to understand data processing practical applications.

Functions of the library

• analyze_nulls(self): This function calculates the missing values percentage per column.

• drop_null_columns(self, percentage): It compares the percentage given and depending on that it eliminates the columns that have greater percentage of null values than the given percentage.

• fill_nulls(self, column, e): Fills the null values with mean/median/mode/random value for numerical data and mode/ffill/bfill/random for categorical data. Also, it has the option of "auto". It is a value, which if the column has numerical data, depending on the distribution it fills the values with the mean/median/mode and in categorical data it fills with the mode.

• analyze_distribution(self, column): This function analyzes the distribution of the column data.

• clean_column_customized(self, column): It cleans a column in the dataset based on customized rules

• graph_num(self, column): It shows an histogram of the data column.

• graph_obj(self, column): It shows an countplot of the data column.

• clean_dataset_percentage(self, percentage): Eliminates the columns and cleans the rest of the columns.

• percentage(self): It demans for a percentage.

Features

The ready features:

  • Awesome feature 1: It automatically analyzes to determine how to fill the missing values of each data column.
  • Awesome feature 2: It analyzes the distribution of numerical data using Pearson's skewness coefficient.
  • Awesome feature 3: It is interactive. Allows the user to choose how missing values will be replaced.

Setup

This library requires:

Python

Pandas: pip install pandas

Numpy: pip install numpy

Seaborn: pip install seaborn

Matplotlib.pyplot: pip install matplotlib

Project Status

Project is: Complete

Room for Improvement

This project can be improved in many aspects.

Room for improvement:

  • Improvement to be done 1: It could ask for the percentage for each column instead of using the same threshold for all columns.
  • Improvement to be done 2: Show better graphs and more figures.

To do:

  • Feature to be added 1: It could write the new dataset in another .csv.
  • Feature to be added 2: It could be done as a telegram bot.

License

MIT

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

team_3_library-1.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

team_3_library-1.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file team_3_library-1.0.1.tar.gz.

File metadata

  • Download URL: team_3_library-1.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for team_3_library-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f0be75bff326794c1ad1c533dc152a4e73546320df85403630ff18b5d788bdfb
MD5 04f7cbe47151f4d7941140342ef68f49
BLAKE2b-256 92d814053a817ec96f9ef79ab3c5c86af359db713ad94c244aa2159a71145af4

See more details on using hashes here.

File details

Details for the file team_3_library-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: team_3_library-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for team_3_library-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07c661b979dd9fa305ff774728bb1033bb454ed4414a762ef786e6c5f4e15a46
MD5 fdf8f670f71adb44f15d4ad163708327
BLAKE2b-256 782bf56a4db9312f7675e785e5d73d53ca7e4f518dbd97b4c44a6cd1b623ca45

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