What I want to do I figured would look like this:
(t in df[self.target]).any()
But I am getting:
AttributeError: 'bool' object has no attribute 'any'
What I want to do I figured would look like this:
(t in df[self.target]).any()
But I am getting:
AttributeError: 'bool' object has no attribute 'any'
I'm assuming it's a pandas DataFrame. Try this
(df[self.target] == t).any()
EDIT:
any((t in k for k in df[self.target]))