Niranda Perera created ARROW-14946:
--------------------------------------
Summary: [C++][Python] An operator for finding indices of a value
Key: ARROW-14946
URL: https://issues.apache.org/jira/browse/ARROW-14946
Project: Apache Arrow
Issue Type: New Feature
Components: C++, Python
Reporter: Niranda Perera
As discussed in this mail thread [1], it would be nice to have a search
operator returning the indices of a Value.
ex:
{code:java}
values = pa.array([1, 2, 2, 3, 4, 1])
indices = find_indices(values, 1) # expected = [0, 5]{code}
currently there is an option to get the "first index" of a value using
aggregates.index method. This would be a binary vector kernel IMO.
This is somewhat similar to `numpy.where` [2] but without a `y` input.
[1] [https://lists.apache.org/thread/o8d4m905fxswcg0qjjx7gj3ql2d582k4]
[2] https://numpy.org/doc/stable/reference/generated/numpy.where.html
--
This message was sent by Atlassian Jira
(v8.20.1#820001)