def german_dataset_age(name_prot=['age']):
    dataset_orig = GermanDataset(protected_attribute_names=name_prot,
                                 privileged_classes=[lambda x: x >= 25],
                                 features_to_drop=['personal_status', 'sex'])
    data, _ = dataset_orig.convert_to_dataframe()
    data.rename(columns={'credit': 'labels'}, inplace=True)
    data.to_csv("dataset/German_age.csv")
def german_dataset(name_prot=['sex']):
    dataset_orig = GermanDataset(protected_attribute_names=name_prot,
                                 features_to_drop=['personal_status', 'age'])

    privileged_groups = [{'sex': 1}]
    unprivileged_groups = [{'sex': 0}]

    data, _ = dataset_orig.convert_to_dataframe()
    data.rename(columns={'credit': 'labels'}, inplace=True)
    sensitive = data[name_prot]
    output = data['labels']
    output.replace((1, 2), (0, 1), inplace=True)
    atribute = data.drop('labels', axis=1, inplace=False)
    atribute.drop(name_prot, axis=1, inplace=True)
    return data, atribute, sensitive, output, privileged_groups, unprivileged_groups
def german_dataset_sex(name_prot=['sex']):
    dataset_orig = GermanDataset(protected_attribute_names=name_prot,
                                 features_to_drop=['personal_status', 'age'])
    data, _ = dataset_orig.convert_to_dataframe()
    data.rename(columns={'credit': 'labels'}, inplace=True)
    data.to_csv("dataset/German_sex.csv")