Skip to content

Commit

Permalink
Update data_preproc_functions.py to solve conversion to float issue (#…
Browse files Browse the repository at this point in the history
…498)

* Using pandas built in functions to optimize time.
  • Loading branch information
baraldian authored Oct 11, 2023
1 parent 4594e98 commit 2572fcb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2572fcb

Please sign in to comment.