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.3.tar.gz (3.2 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.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybandiger-0.1.3.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

Hashes for pybandiger-0.1.3.tar.gz
Algorithm Hash digest
SHA256 823921a30b70a11c76c278d5203967871a3ed74ef03de0a1e5af9dd16a7bfeda
MD5 5c322ebdedbddf91b1ea18d974283361
BLAKE2b-256 cc5c01698db6b90a18621b2024c843667ae9ef7366fb44b5f743223b4e488063

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybandiger-0.1.3-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

Hashes for pybandiger-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 85ff6229bbe781f14ef0e23f7c030637acc13913f2e2540c449dcc4d8ac81fb8
MD5 7db441c870bdf0169617e211e68b84e9
BLAKE2b-256 1cf84ccf47a134b0b1f12d1e1863ffd4fa15cd24b4ad77bf554dc56acd318032

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