out = np.full(mask.shape, np.nan)
out[mask] = np.concatenate(v)
return out
df['Isin'] = (box(df.Lists.tolist()) == df.Number.values[:, (None)]).any(1) * 1
Find a number in a list, both the number and list are stored in pandas cells