I have two separate dataframes with ~100k rows each. One dataframe contains a list (column title "list_A") of column names that meet criteria A, the other (column title "list_B") has a list of names that fail to meet criteria B (calculated from separate information specific to their relative dataframes). I'm trying to create a list of names that meet both criteria by removing the names in list B from list A without using a loop. Is this possible?
For instance, pulling the column "list_A" may be something like this:
[['X','Y','Z','A'],
['X','Y','Z','A'],
['Y','Z','A']...]
And "list_B" may be something like this:
[['Z'],
[],
['A']...]
And I'd like to end up with this:
[['X','Y','A'],
['X','Y','Z','A'],
['Y','Z']...]
Is there a way to do this without a time-expensive for loop?