A comprehensive Python library for data preprocessing tasks
Project description
PyTHub
Project Description
PyTHub is a comprehensive Python library designed for data preprocessing tasks. It provides a variety of functions for data cleaning, transformation, and manipulation, making it an essential tool for data engineering projects. The library is built to be publishable on the Python Package Index (PyPI).
Installation
To install PyTHub, use the following command:
pip install pythub
Usage Examples
Here's a brief example of how to use some of the key features of PyTHub:
from pythub import (
MissingValueHandler,
OutlierHandler,
Scaler,
TextCleaner,
FeatureEngineer,
DataTypeConverter,
CategoricalEncoder,
DateTimeHandler,
DataFrameLoader,
DataSorter,
DataFrameModifier
)
import pandas as pd
# Load a CSV file into a DataFrame
data = DataFrameLoader.read_csv('synthetic_sample_data.csv')
# Delete rows with missing data in the 'Rating' column
data_1 = MissingValueHandler.delete_missing(data, columns=['Rating'])
# Display the processed DataFrame
print(data_1)
Features
PyTHub includes the following modules and functionalities:
MissingValueHandler: Handle missing values by replacement or deletion. -replace_value(df, value) -impute_mean(df, columns) -impute_median(df, columns) -impute_constant(df, columns, value) -delete_missing(df, columns) -get_rows_with_missing_data(df, column)
OutlierHandler: Detect and handle outliers using the IQR method. -iqr_outliers(df, column, threshold=1.5)
Scaler: Standardize and normalize data. -standard_scale(df, columns) -minmax_scale(df, columns)
TextCleaner: Perform string manipulation and text cleaning. -remove_stopwords(text) -to_lowercase(text) -remove_punctuation(text) -lemmatize(text) -clean_text(text) -clean_columns(df, columns)
FeatureEngineer: Create new features. -create_feature(df, column, func)
DataTypeConverter: Convert data types. -to_numeric(df, columns) -to_categorical(df, columns)
CategoricalEncoder: Encode categorical data. -one_hot_encode(df, columns) -label_encode(df, columns)
DateTimeHandler: Handle date and time data. -to_datetime(df, columns) -extract_date_parts(df, column)
DataFrameLoader: Read data from CSV files. -read_csv(file_path, **kwargs)
DataSorter: Sort DataFrame rows. -sort_by_row(df, column, ascending=True)
DataFrameModifier: Modify DataFrames. -delete_column(df, column)
Dependencies
PyTHub requires the following libraries:
- re
- string
- nltk
- numpy
- pandas
- typing
Authors
- MHD Alhabeb Alshalah
- Mohamed Ragab Abdelfattah Abdelfadeel
- AHMED EMAD ELSAYED MOHAMED ABDELFATTAH
Changelog
Version 1.0.0: Initial release with basic functionalities.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythub-0.1.2.tar.gz.
File metadata
- Download URL: pythub-0.1.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cc7b4842fb45c4dfe461ff5f21eb1d8eae798c5aec0ba56e7c9879dbfaa23b4
|
|
| MD5 |
45df42a99356fc211eea3922a68fbd97
|
|
| BLAKE2b-256 |
2f41fb214039590482688e9c60971fb61499e405fe9016cbd51d6415e8325c3d
|
File details
Details for the file pythub-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pythub-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcd4fe38546b37bcb5738465b7484d33192207fc67d5edcdb71c0ba193c650fc
|
|
| MD5 |
aeadad2c6edd6cff2f5e71b8fe1e94aa
|
|
| BLAKE2b-256 |
5b2a5e1d847a6e1efd375ea3abb58fc823e509b7f5ade13617bd196f47883d19
|