There is actually a `pd.match(s, [2, 4])` function which does exactly this. Although, I don't know to which extent it should be advertised, as it is nowhere in the docs and is maybe also not in the best shape? @y-p @jreback ?