I'm trying to filter out a pandas data-frame based on some a variable list task_ids
that exist in the df.
for example if task_ids = [1,5,7]
then I'd want the following functionality:
df[(df.task_id = 1) & (df.task_id = 5) & (df.task_id = 7)]
How am I able to filter it out using a variable list? e.g. task_ids
might be a list of size 1 or a list of size 13.