Logical operators for Boolean indexing in Pandas
When you say You are implicitly asking Python to convert (a[‘x’]==1) and (a[‘y’]==10) to Boolean values. NumPy arrays (of length greater than 1) and Pandas objects such as Series do not have a Boolean value — in other words, they raise ValueError: The truth value of an array is ambiguous. Use a.empty, a.any() or a.all(). when used as a … Read more