Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
I want to filter my dataframe with an or condition to keep rows with a particular column’s values that are outside the range [-0.25, 0.25]. I tried: df = df[(df[‘col’] < -0.25) or (df[‘col’] > 0.25)] But I get the error: Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() … Read more