I have a list of valid queue numbers.
valid_queues=[470,471,472,473,474,475,476,477,478,479,490,497]
I want to remove the rows which has queue numbers NOT present in this list.
df.drop(df[df['Queue'] not in valid_queues].index, inplace = True)
The above code is giving an error :
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Where am I going wrong?