"Passing list-likes to .loc or [] with any missing labels is no longer supported

Respected Community Member
greetings of the day,

Here I was stuck in previously written code and getting an error, now I am unable to fix it. please help to write the code to fix this issue

my notebook link is as follows:

https://www.kaggle.com/rai2878/credit-risk-perilousness-analysis-part-2

Error in Line: [39]

“Passing list-likes to .loc or with any missing labels is no longer supported. The following labels were missing: Index([‘home_ownership:RENT_OTHER_NONE_ANY’, ‘addr_state:ND_NE_IA_NV_FL_HI_AL’,\n ‘addr_state:NM_VA’, ‘addr_state:OK_TN_MO_LA_MD_NC’,\n ‘addr_state:UT_KY_AZ_NJ’,\n …\n ‘mths_since_last_record:3-20’, ‘mths_since_last_record:21-31’,\n ‘mths_since_last_record:32-80’, ‘mths_since_last_record:81-86’,\n ‘mths_since_last_record:>=86’],\n dtype=‘object’, length=82)”

https://www.kaggle.com/rai2878/credit-risk-perilousness-analysis-part-2

Regards
Amit Rai