lengthy criteria in dataframe selector I'd like to get records with country codes not in a long list , something along the lines of 

country_list = ['BR','MX','CO',...]
df = df[df['country_code'] not in country_list]

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().


what's an elegant way to do it?
df = df[~df['country_code'].isin(country_list)]


https://pandas.pydata.org/pandas-docs/stable/gotchas.html#using-the-in-operator