File size: 462 Bytes
2aa4a2c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
def csv_to_featuers_list(csv_file):
if csv_file == None:
return ['No csv yet']
df = pd.read_csv(csv_file)
return df.columns
def pre_process_df(df):
df.dropna(inplace=True)
df.drop_duplicates(inplace=True)
df.reset_index(inplace=True, drop=True)
return df
def pre_process_features(X):
scaler = MinMaxScaler()
X = scaler.fit_transform(X)
return X |