I have a data-frame of the format
where I apply a conditional operator on a series :
list1=[]
if (fi['datedelta'] <10): list1.append(fi['TC'])
I get the value error
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I found out a few resources addressing this After which , I tried :
if(np.where(fi['datedelta'] <= 10 & fi['datedelta'] > 0)):list1.append(fi['TC'])
but I am getting the same error.