I am having problem with logical operators in pandas. If I try :
list1=['x','y']
if st1=='A' & str2 not in list1: #do stuff
I get:
unsupported operand type(s) for &: 'str' and 'bool'", u'occurred at index 0
But this works: Why?
if st1=='A' and str2 not in list1: #do stuff
All I did was change & to and.