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
frame.iloc[[x for x in range(len(frame)) if set(letters).issubset(frame.iloc[x,0])]]
output:
a
0 a,b,c
1 a,c,f
3 a,z,c
timeit
%%timeit
#hermes
frame.iloc[[x for x in range(len(frame)) if set(letters).issubset(frame.iloc[x,0])]]
output
300 µs ± 32.9 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)