Advertisement
korenizla

Alina

Feb 22nd, 2022
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def total_income_group(total_income):
  2.     if total_income <= 30000:
  3.         return 'E'
  4.     if total_income <= 50000:
  5.         return 'D'
  6.     if total_income <= 200000:
  7.         return 'C'
  8.     if total_income <= 1000000:
  9.         return 'B'
  10.     else:
  11.         return 'A'
  12.  
  13. loan.apply(lambda total_income: total_income_group(total_income), axis=1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement