def filter_data(data, var_val_pairs):
    """
    We use this to filter the data more easily than using pandas subsetting

    Args:
        data (df) is a dataframe
        var_val pairs (dict) is a dictionary where the keys are variables and the value are values
    """
    d = data.copy()

    for k, v in var_val_pairs.items():
        d = d.loc[d[k] == v]

    return d.reset_index(drop=True)