I have array (or rather pandas frame) that has a column `A`, values in this columns are integers (let's assume that they belong to range 1..10). 

Now I would have to select rows in this array that have `A` values of `{3, 6, 9}` (in this example it is possible to just or `==` operations but in real life this set be a lot longer. 

Is there any funciton in either library (`pandas` or `numpy`) that allows me to do following fast: 

```
arr = pandas.DataFrame(...)
values = [3, 6, 9] 
valid_indexes = magic_function(arr.A, values)

```

or in numpy: 

```
arr = np.ndarray(...)
values = [3, 6, 9] 
valid_indexes = magic_function(arr[13, :], values)

```

In other words I'm looking for element-wise `in` operator.