Answers for "determine series is in a list"

0

determine series is in a list

>>> s = pd.Series(['lama', 'cow', 'lama', 'beetle', 'lama',
...                'hippo'], name='animal')
>>> s.isin(['cow', 'lama'])
0     True
1     True
2     True
3    False
4     True
5    False
Name: animal, dtype: bool
Posted by: Guest on April-02-2020

Code answers related to "determine series is in a list"

Browse Popular Code Answers by Language