[
https://issues.apache.org/jira/browse/ARROW-2667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16836268#comment-16836268
]
Joris Van den Bossche commented on ARROW-2667:
----------------------------------------------
{quote}Note that pandas' `take` is a bit complicated by trying to satisfy two
APIs simultaneously.
[...]
And then there's the "pandas" style `take` where `-1` means "indicator for
missing values, which should be filled with the `na_value` parameter." Other
negative numbers are not allowed.{quote}
I think this distinction in Arrow is less relevant / easier to deal with. The
indices can also have nulls, resulting of nulls in the returned array. This
basically takes the role of the -1 in the "pandas style" take.
(working on the Array part in https://github.com/apache/arrow/pull/4281)
> [C++/Python] Add pandas-like take method to Array/Column/ChunkedArray
> ---------------------------------------------------------------------
>
> Key: ARROW-2667
> URL: https://issues.apache.org/jira/browse/ARROW-2667
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++, Python
> Reporter: Uwe L. Korn
> Priority: Major
> Fix For: 0.14.0
>
>
> We should add a {{take}} method to {{Array/ChunkedArray/Column}} that takes a
> list of indices and returns a reordered array.
> For reference, see Pandas' interface:
> https://github.com/pandas-dev/pandas/blob/2cbdd9a2cd19501c98582490e35c5402ae6de941/pandas/core/arrays/base.py#L466
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)