I am trying to only keep the rows in a dataframe where either one of these two columns is equal to a certain value, the value is 4.
df = df[df['Device_Price'] == 4 or df['Food_Price'] == 4]
this returns:
f"The truth value of a {type(self).__name__} is ambiguous. "
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().