def treat_missing_categorical(df, columns, how="mode"):
    """
    Function to treat missing values in numeric columns
    Required Input - 
        - df = Pandas DataFrame
        - columns = List input of all the columns need to be imputed
        - how = valid values are 'mode', any string or numeric value
    Expected Output -
        - Pandas dataframe with imputed missing value in mentioned columns
    """
    if how == "mode":
        for i in columns:
            print("Filling missing values with mode for columns - {0}".format(i))
            df.ix[:, i] = df.ix[:, i].fillna(df.ix[:, i].mode()[0])
    elif type(how) == str:
        for i in columns:
            print("Filling missing values with {0} for columns - {1}".format(how, i))
            df.ix[:, i] = df.ix[:, i].fillna(how)
    elif type(how) == int or type(how) == float:
        for i in columns:
            print("Filling missing values with {0} for columns - {1}".format(how, i))
            df.ix[:, i] = df.ix[:, i].fillna(str(how))
    else:
        print("Missing value fill cannot be completed")
    return df

    def z_scaler(df, columns):
        """
    Function to standardize features by removing the mean and scaling to unit variance
    Required Input - 
        - df = Pandas DataFrame
        - columns = List input of all the columns which needs to be min-max scaled
    Expected Output -
        - df = Python DataFrame with Min-Max scaled attributes
        - scaler = Function which contains the scaling rules
    """

    scaler = StandardScaler()
    data = pd.DataFrame(scaler.fit_transform(df.loc[:, columns]))
    data.index = df.index
    data.columns = columns
    return data, scaler