python中and与&报错 ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item()

需要求得满足多个逻辑条件的数据时,要使用& 和|,在某些条件下用and/ or会报错‘ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().’

python中and与&报错 ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item()

我把and换成&,错误就解决啦!