I have a column in a DataFrame which contains either strings or tuples of strings. I would like to check whether a certain tuple of values is present in that column.
s = pd.Series(['a', ('b', 'c', 'd')])
'a' in s.values
This returns True. However:
('b', 'c', 'd') in s.values
returns False, with a warning: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison.
How can I work around this?