def outlier_removal_median(dataframe, colname, low_cut, high_cut):
    """Replace outliers with the median on dataframe[colname]"""
    col = dataframe[colname]
    col_numerics = col.loc[col.apply(lambda x: isinstance(x, (int, float)) and
        (x >= low_cut and x <= high_cut))]
    dataframe.loc[col.apply(lambda x: isinstance(x, (int, float)) and (x <
        low_cut or x > high_cut)), colname] = col_numerics.median()
    return dataframe
