Streamlit_code / utils /preprocessing.py
Junaid-EEE11's picture
Update utils/preprocessing.py
dcda405
raw
history blame
375 Bytes
# utils/preprocessing.py
import pandas as pd
from sklearn.preprocessing import StandardScaler
def preprocess_data_for_streamlit(data_path):
df = pd.read_csv(data_path)
df = feature_engineering(df) # Assuming feature_engineering is defined
X = df.drop('label', axis=1)
scaler = StandardScaler()
X_scaled = scaler.fit_transform(X)
return df, X_scaled