I have a dataframe df where there are 3 columns
id code status
1 US Y
2 IN Y
3 UK Y
4 CN Y
5 KR Y
I want to update column status to N where code not in ("US", "UK")
I tried using this but failed
df.loc[df['code'] not in ("US","UK"),["status"]] ='N'