im trying to find whether an pyarrow array of values is in another pyarrow array of values, similar to pyspark or pandas isin function. According to the docs i should be able to use
pyarrow.compute.is_in(values, *, memory_pool=None, options=None, value_set, skip_nulls=False)
but cant figure out how to use it properly, i've tried the following:
array1 = pa.array([1,2,3,4])
array1 = pa.array([1,4])
hoping to get
pyarrow.compute.is_in(array1,array2)
#<pyarrow.lib.BooleanArray object at memaddres>
#[
# true,
# false,
# false,
# true
#]
but instead get the folling errors:
- cp.is_in(array1,array2):
ArrowInvalid: Function is_in accepts 1 arguments but attempted to look up kernel(s) with 2 - cp.is_in(values = array1,value_set = array2):
TypeError: __init__() got an unexpected keyword argument 'values'
Im using python 3 with pyarrow -v 5.0.0
Thanks in advance