I am trying to do something like
exclude_values = range(low, high) # for the sake of example
df = df[df['blah'] not in exclude_values]
which just raises the "truth value of a Series is ambiguous" exception. The problem is, I can't see how to change this syntax so as not to use not in
. What (presumably very obvious) thing am I missing?