def filter_columns(table, filter_in=None, filter_out=None):
    """
    Table column filter function.
    After this function, the remaining feature will satisfy:
    being in filter_in and not being in filter_out.
    Parameters
    ----------
    table: pandas dataframe table, 
        table to normalise by the mean and std.
    filter_in: string,
        if the pattern is in the feature, keep the feature.
    filter_out: string,
        if the pattern is in the feature, exclude the feature.
    Returns
    -------
    Table with filtered columns.
    """
    feat = table.columns
    if filter_in is not None:
        feat = [el for el in feat if filter_in in feat]
    if filter_out is not None:
        feat = [el for el in feat if filter_out not in el]
    return table[feat]