I am receiving below error message in Python after this line of code: data is the panda data frame and A, B are numbers.
if((data.loc[ii]>=A) & (data.loc[ii]<B)):
labels[ii]=C
Error :The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I have read everything in the internet it says use & instead of and and | instead of or, I even use the parenthesis to avoid operator precedence rule but I am wondering why I am still getting the above error since I am using correct logical operator ?.
Thanks