[
https://issues.apache.org/jira/browse/ARROW-15131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joris Van den Bossche updated ARROW-15131:
------------------------------------------
Description:
Small example I ran into:
{code:python}
>>> arr = pa.array(['a', 'b', 'c', 'd'])
>>> pc.is_in(arr, ['a', 'c'])
...
TypeError: "['a', 'c']" is not a valid value set
{code}
That's not a super friendly error message (it was not directly clear what is
not "valid" about this). Passing {{pa.array(['a', 'c'])}} explicitly works, but
I expected that the kernel would try this automatically (as we also convert the
first array argument to an array).
was:
Small example I ran into:
{code:python}
>>> arr = pa.array(['a', 'b', 'c', 'd'])
>>> pc.is_in(arr, ['a', 'c'])
...
TypeError: "['a', 'c']" is not a valid value set
{code}
That's not a super friendly error message (it was not directly clear what is
not "valid" about this). Passing {{pa.array(['a', 'c']) explicitly works, but I
expected that the kernel would try this automatically (as we also convert the
first array argument to an array).
> [Python] Coerce value_set argument to array in "is_in" kernel
> -------------------------------------------------------------
>
> Key: ARROW-15131
> URL: https://issues.apache.org/jira/browse/ARROW-15131
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Python
> Reporter: Joris Van den Bossche
> Priority: Major
> Labels: compute
>
> Small example I ran into:
> {code:python}
> >>> arr = pa.array(['a', 'b', 'c', 'd'])
> >>> pc.is_in(arr, ['a', 'c'])
> ...
> TypeError: "['a', 'c']" is not a valid value set
> {code}
> That's not a super friendly error message (it was not directly clear what is
> not "valid" about this). Passing {{pa.array(['a', 'c'])}} explicitly works,
> but I expected that the kernel would try this automatically (as we also
> convert the first array argument to an array).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)