Challenge: Analyze Loan Portfolio Risk
Swipe to start coding
Given a DataFrame containing loan data with columns for principal, interest_rate, and risk_score, identify all loans with a risk_score above 0.7, calculate their total principal, and print the average interest rate for these high-risk loans.
- Filter the DataFrame to include only rows where the
risk_scoreis greater than 0.7. - Calculate the sum of the
principalvalues for the filtered loans. - Compute the mean of the
interest_ratevalues for the filtered loans. - Print the total principal and average interest rate.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Чудово!
Completion показник покращився до 4.76
Challenge: Analyze Loan Portfolio Risk
Свайпніть щоб показати меню
Swipe to start coding
Given a DataFrame containing loan data with columns for principal, interest_rate, and risk_score, identify all loans with a risk_score above 0.7, calculate their total principal, and print the average interest rate for these high-risk loans.
- Filter the DataFrame to include only rows where the
risk_scoreis greater than 0.7. - Calculate the sum of the
principalvalues for the filtered loans. - Compute the mean of the
interest_ratevalues for the filtered loans. - Print the total principal and average interest rate.
Рішення
Дякуємо за ваш відгук!
single