I am trying to take 2 columns in Pandas that contain Boolean values and create a third column that is the OR of these Boolean values.
For example, my dataframe currently contains A and B, and I want to create C.
A B C
True True True
False False False
True False True
False True True
My code:
df['C']=df['A'] or df['B']
I have tried to change the structure of the statement several ways but end up with the same error message:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().