I have a df like this:
frame = pd.DataFrame({\'a\' : [\'a,b,c\', \'a,c,f\', \'b,d,f\',\'a,z,c\']})
And a list of items:
let
Use set.issubset:
frame = pd.DataFrame({'a' : ['a,b,c', 'a,c,f', 'b,d,f','a,z,c','x,y']}) letters = ['a','c'] frame[frame['a'].apply(lambda x: set(letters).issubset(x))] Out: a 0 a,b,c 1 a,c,f 3 a,z,c