data_preprocess.py
def scale(data, continuous):
    '''
    Normalize the continuous variables and stores the minimum and maximum values of each variable if we want to rescale them back.
    
    Args:
        data: DataFrame containing the dataset
        continuous: Array-like structure that contains the names of all the continuous features

    Returns:
        data: DataFrame after the Normalization
        MinMax: A DataFrame that contains the minimum and maximum values of each variable
    '''
    if continuous: 
        MinMax = pd.DataFrame(columns = continuous, index = ['min', 'max'])
        for col in continuous:
            MinMax.loc['max', col] = data[col].max()
            MinMax.loc['min', col] = data[col].min()
        scaler = MinMaxScaler()
        data[continuous] = scaler.fit_transform(data[continuous])
        return [data, MinMax]
    return [data, None]

    Normalize the continuous variables and stores the minimum and maximum values of each variable if we want to rescale them back.
    
    Args:
        data: DataFrame containing the dataset
        continuous: Array-like structure that contains the names of all the continuous features

    Returns:
        data: DataFrame after the Normalization
        MinMax: A DataFrame that contains the minimum and maximum values of each variable
    
Normalize the continuous variables and stores the minimum and maximum values of each variable if we want to rescale them back.
Normalize the continuous variables and stores the minimum and maximum values of each variable if we want to rescale them back .
def scale(data, continuous):
    if continuous: 
        MinMax = pd.DataFrame(columns = continuous, index = ['min', 'max'])
        for col in continuous:
            MinMax.loc['max', col] = data[col].max()
            MinMax.loc['min', col] = data[col].min()
        scaler = MinMaxScaler()
        data[continuous] = scaler.fit_transform(data[continuous])
        return [data, MinMax]
    return [data, None]
def scale ( data , continuous ) : if continuous : MinMax = pd . DataFrame ( columns = continuous , index = [ 'min' , 'max' ] ) for col in continuous : MinMax . loc [ 'max' , col ] = data [ col ] . max ( ) MinMax . loc [ 'min' , col ] = data [ col ] . min ( ) scaler = MinMaxScaler ( ) data [ continuous ] = scaler . fit_transform ( data [ continuous ] ) return [ data , MinMax ] return [ data , None ]
Normalize the continuous variables and stores the minimum and maximum values of each variable if we want to rescale them back.
Normalize the continuous variables and stores the minimum and maximum values of each variable if we want to rescale them back .
'''
    Normalize the continuous variables and stores the minimum and maximum values of each variable if we want to rescale them back.
    
    Args:
        data: DataFrame containing the dataset
        continuous: Array-like structure that contains the names of all the continuous features

    Returns:
        data: DataFrame after the Normalization
        MinMax: A DataFrame that contains the minimum and maximum values of each variable
    '''
DataFrame after the Normalization
MinMax: A DataFrame that contains the minimum and maximum values of each variable
DataFrame after the Normalization MinMax : A DataFrame that contains the minimum and maximum values of each variable
data
data
DataFrame containing the dataset
DataFrame containing the dataset
continuous
Array-like structure that contains the names of all the continuous features
Array - like structure that contains the names of all the continuous features