semvec/pypi-packages huggingface dataset:
mypreprocessinglib 0.1
A comprehensive data preprocessing library for Python
Requires Python: >=3.6

import pandas as pd
import numpy as np
from mypreprocessinglib.missing_value_handler import missing_value_handler
from mypreprocessinglib.outlier_handler import outlier_handler
from mypreprocessinglib.scaler import scaler
from mypreprocessinglib.text_cleaner import text_cleaner
from mypreprocessinglib.feature_engineer import feature_engineer
from mypreprocessinglib.data_type_converter import data_type_converter
from mypreprocessinglib.categorical_encoder import categorical_encoder
from mypreprocessinglib.date_time_handler import date_time_handler

# Example usage
data = pd.DataFrame({'A': [1, 2, np.nan, 4], 'B': [np.nan, 6, 7, 8]})
missing_handler = missing_value_handler()
missing_values = missing_handler.detect_missing_values(data)
print(missing_values)

# Example usage
data = pd.DataFrame({'A': [1, 2, 100, 4], 'B': [5, 6, 7, 800]})
outliers = outlier_handler.detect_outliers(data)
print(outliers)

# Example usage
data = pd.DataFrame({'A': [1, 2, 3, 4], 'B': [4, 3, 2, 1]})
scaled_data = scaler.standardize_data(data)
print(scaled_data)

# Example usage
text = "This is a sample text, with punctuation and stopwords!"
cleaned_text = text_cleaner.clean_text(text)
print(cleaned_text)

# Example usage
data = pd.DataFrame({'Feature1': [1, 2, 3], 'Feature2': [4, 5, 6]})
data_with_new_feature = feature_engineer.create_new_features(data)
print(data_with_new_feature)

# Example usage
data = pd.DataFrame({'A': ['1', '2', '3'], 'B': ['4', '5', '6']})
numeric_data = data_type_converter.convert_to_numeric(data, columns=['A', 'B'])
print(numeric_data)

# Example usage
data = pd.DataFrame({'A': ['cat', 'dog', 'bird'], 'B': ['red', 'blue', 'green']})
encoded_data = categorical_encoder.one_hot_encode(data, columns=['A', 'B'])
print(encoded_data)

# Example usage
data = pd.DataFrame({'Data': ['2023-01-01', '2023-02-01', '2023-03-01']})
data_with_features = date_time_handler.extract_data_features(data, column='Data')
print(data_with_features)