isin
>>> s = pd.Series(list('abc'))
>>> s.isin(['a', 'c', 'e'])
0 True
1 False
2 True
dtype: bool
isnotin
>>> s = pd.Series(list('abc'))
>>> ~s.isin(['a', 'c', 'e'])
0 False
1 True
2 False
dtype: bool
>>> s = pd.Series(list('abc'))
>>> s.isin(['a', 'c', 'e'])
0 True
1 False
2 True
dtype: bool
>>> s = pd.Series(list('abc'))
>>> ~s.isin(['a', 'c', 'e'])
0 False
1 True
2 False
dtype: bool