Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code block for "Building a Neural Network to Predict Loan Risk"
import numpy as np
loans["fraction_recovered"] = np.where(
(loans["loan_status"] == "Fully Paid") | (loans["fraction_recovered"] > 1.0),
1.0,
loans["fraction_recovered"],
)
loans.groupby("loan_status")["fraction_recovered"].describe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.