Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybandiger-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

pybandiger-0.1.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file pybandiger-0.1.2.tar.gz.

File metadata

  • Download URL: pybandiger-0.1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for pybandiger-0.1.2.tar.gz
Algorithm Hash digest
SHA256 814f1a119658723e777ae5820dddca25552599154fc8b1b33a49de950a75f1ea
MD5 c526b35362bfbc174d18e304b6871cb0
BLAKE2b-256 6ab357fcda40156a7f428fafd2752099b440eeda5e06e1d9850bf3e1fe36e044

See more details on using hashes here.

File details

Details for the file pybandiger-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pybandiger-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for pybandiger-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 426e246aea6409ceb5fafe76416f22f5e851ef91432cf8e8eca4a400193c7aa1
MD5 27facbbfe1ec8999435c913bb89a8fec
BLAKE2b-256 9af023594f77011056b37d599eb78187e65d788208197ba3bc00a4262e1d2bf3

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