A data wrangling library
Project description
PyBandiger
PyBandiger is a Python library for preprocessing data, including cleaning, encoding, and scaling. It is designed to simplify the data wrangling process for machine learning tasks.
Installation
You can install PyBandiger using pip:
pip install pybandiger
Usage
Importing the Library
from pybandiger import PyBandiger
Creating an Instance
pb = PyBandiger()
Cleaning Data
The clean method fills missing values in categorical columns with 'Missing' and in numerical columns with the mean of the column.
cleaned_data = pb.clean(data)
Encoding and Scaling Data
The EncodeAndScale_fit method encodes categorical columns using LabelEncoder and scales numerical columns using StandardScaler.
encoded_scaled_data = pb.EncodeAndScale_fit(cleaned_data)
The EncodeAndScale_transform method transforms new data using the previously fitted encoders and scaler.
new_encoded_scaled_data = pb.EncodeAndScale_transform(new_data)
Example
import pandas as pd
from pybandiger import PyBandiger
# Sample data
data = pd.DataFrame({
'category': ['A', 'B', 'A', None],
'value': [1.0, 2.5, None, 4.0]
})
# Create an instance of PyBandiger
pb = PyBandiger()
# Clean the data
cleaned_data = pb.clean(data)
# Encode and scale the data
encoded_scaled_data = pb.EncodeAndScale_fit(cleaned_data)
print(encoded_scaled_data)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
Author
Lansari Fedi - lansarifedi7@gmail.com
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 pybandiger-0.1.5.tar.gz.
File metadata
- Download URL: pybandiger-0.1.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
528ea8255348c3201f9050faf4841f592ecfbae9f157b18a078479c0b72d58f3
|
|
| MD5 |
be12785f158f3339292899302ecd2a43
|
|
| BLAKE2b-256 |
ec75c1dcbc8f1db8f2c82a756a8e8fcb760c17b8aaf04905ff1cbe7f6d55c2da
|
File details
Details for the file pybandiger-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pybandiger-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a7ffdd0b0d7faa1ec3c6f2bbeac67c6ec29fca10036c8e2d5cce642637c26fe
|
|
| MD5 |
a165594995fdb31b9f4c786dea4deaaf
|
|
| BLAKE2b-256 |
e805ae39c3b387ccccd0c837dd33d75f924c45335c0bc5fdf93715a8e11daa84
|