I can easily check whether each is equal to a number:
In [20]: s = pd.Series([1, 2, 3]) In [21]: s == 1 Out[21]: 0 True 1 False 2 False My problem is, is there a function like s._in([1, 2]) and output something like
0 True 1 True 2 False Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalI can easily check whether each is equal to a number:
In [20]: s = pd.Series([1, 2, 3]) In [21]: s == 1 Out[21]: 0 True 1 False 2 False My problem is, is there a function like s._in([1, 2]) and output something like
0 True 1 True 2 False