I have a data set like d1.
d1
import pandas as pd d1 = { \'customers\': pd.Series([1, 1, 1, 2, 2, 3, 3, 4, 4]), \'channel\': pd.Series([\'a\', \'a\', \
Is this what you want ?
d1[d1.customers.isin(d1[(d1.freq==2) & (d1.channel=="a")].customers)] channel customers freq 3 c 2 2 4 a 2 2 5 a 3 2 6 b 3 2
HTH