Fraud-Credit-Card-app / src /preprocessor.py
OwusuBlessing
ready
5a61a47
raw
history blame contribute delete
469 Bytes
# -*- coding: utf-8 -*-
"""
Created on Fri May 19 01:26:45 2023
@author: ME
"""
import pandas as pd
def transform_single_data_point(single_data,preprocessing_obj):
# Create a DataFrame from the single data point
single_data_df = pd.DataFrame([single_data], index=[0])
# Transform the single data point using the ColumnTransformer
transformed_data_point_arr = preprocessing_obj.transform(single_data_df)
return transformed_data_point_arr