diff --git a/aif360/algorithms/preprocessing/optim_preproc_helpers/data_preproc_functions.py b/aif360/algorithms/preprocessing/optim_preproc_helpers/data_preproc_functions.py index 11e0b296..708ca135 100644 --- a/aif360/algorithms/preprocessing/optim_preproc_helpers/data_preproc_functions.py +++ b/aif360/algorithms/preprocessing/optim_preproc_helpers/data_preproc_functions.py @@ -265,7 +265,7 @@ def group_status(x): df['credit_history'] = df['credit_history'].apply(lambda x: group_credit_hist(x)) df['savings'] = df['savings'].apply(lambda x: group_savings(x)) df['employment'] = df['employment'].apply(lambda x: group_employ(x)) - df['age'] = df['age'].apply(lambda x: np.float(x >= 26)) + df['age'] = (df['age'] >= 26).astype(float) df['status'] = df['status'].apply(lambda x: group_status(x)) return df