pandas version: '1.2.3'
, python version: 3.7.9
code:
x = pd.DataFrame({'a':[1,2], 'b':[2,3]})
x['a']>1 & x['b'] <= 2
it shows ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
this kind of usage seems common. pandas: multiple conditions while indexing data frame - unexpected behavior
thanks for help in advance.