(df, missing="zeros", scaler="robust", **kwargs)
return df
Scale values in a Data Frame using the relevant sklearn preprocessing method.
    Valid options for the scaler are: standard, minmax, maxabs, robust, quantile
    Missing values must be dealt with before the scaling is applied. 
    Valid options specified through the missing parameter are: zeros, mean, median, mode
Scale values in a Data Frame using the relevant sklearn preprocessing method.
    Valid options for the scaler are: standard, minmax, maxabs, robust, quantile
    Missing values must be dealt with before the scaling is applied. 
    Valid options specified through the missing parameter are: zeros, mean, median, mode
Scale values in a Data Frame using the relevant sklearn preprocessing method . Valid options for the scaler are : standard minmax maxabs robust quantile Missing values must be dealt with before the scaling is applied . Valid options specified through the missing parameter are : zeros mean median mode
def scale(df, missing="zeros", scaler="robust", **kwargs):
    """
    Scale values in a Data Frame using the relevant sklearn preprocessing method.
    Valid options for the scaler are: standard, minmax, maxabs, robust, quantile
    Missing values must be dealt with before the scaling is applied. 
    Valid options specified through the missing parameter are: zeros, mean, median, mode
    """
    
    scalers = {'standard':'StandardScaler', 'minmax':'MinMaxScaler', 'maxabs':'MaxAbsScaler',\
               'robust':'RobustScaler', 'quantile':'QuantileTransformer'}
    
    s = getattr(preprocessing, scalers[scaler])
    s = s(**kwargs)
    
    df = fillna(df, method=missing)
    df = pd.DataFrame(s.fit_transform(df), index=df.index, columns=df.columns)
    
    return df
def scale ( df , missing = "zeros" , scaler = "robust" , * * kwargs ) : scalers = { 'standard' : 'StandardScaler' , 'minmax' : 'MinMaxScaler' , 'maxabs' : 'MaxAbsScaler' , 'robust' : 'RobustScaler' , 'quantile' : 'QuantileTransformer' } s = getattr ( preprocessing , scalers [ scaler ] ) s = s ( * * kwargs ) df = fillna ( df , method = missing ) df = pd . DataFrame ( s . fit_transform ( df ) , index = df . index , columns = df . columns ) return df