Skip to content

[Python] Coerce value_set argument to array in "is_in" kernel #30639

@asfimport

Description

@asfimport

Small example I ran into:

>>> arr = pa.array(['a', 'b', 'c', 'd'])
>>> pc.is_in(arr, ['a', 'c'])
...
TypeError: "['a', 'c']" is not a valid value set

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).

Reporter: Joris Van den Bossche / @jorisvandenbossche

Note: This issue was originally created as ARROW-15131. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions