[
https://issues.apache.org/jira/browse/ARROW-14608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17622856#comment-17622856
]
Jacek Pliszka commented on ARROW-14608:
---------------------------------------
I think it should be relatively easy to do something like this:
`
t{color:#000000}.group_by([{color}{color:#a31515}'keys'{color}{color:#000000},
{color}{color:#a31515}'values'{color}{color:#000000}]).aggregate(){color}
{color:#000000}I did some naive benchmarks and looks like it should be 30%
faster than converting to pandas and deduplicating. This was my naive
test:{color}
{color:#000000}`
{color}{color:#000000}t.append_column({color}{color:#a31515}'i'{color}{color:#000000},
pa.array([{color}{color:#098658}1{color}{color:#000000}]*{color}{color:#795e26}len{color}{color:#000000}(t),pa.int64())).group_by([{color}{color:#a31515}'keys'{color}{color:#000000},
{color}{color:#a31515}'values'{color}{color:#000000}]).aggregate([({color}{color:#a31515}"i"{color}{color:#000000},
{color}{color:#a31515}"max"{color}{color:#000000})]).drop([{color}{color:#a31515}'i_max'{color}{color:#000000}]){color}
{color:#000000}actuall aggregation without i should be even faster still will
allow drop_duplicates functionality until better implementation arrives{color}
> [Python] Provide access to hash_aggregate functions through a group_by method
> -----------------------------------------------------------------------------
>
> Key: ARROW-14608
> URL: https://issues.apache.org/jira/browse/ARROW-14608
> Project: Apache Arrow
> Issue Type: Sub-task
> Components: Python
> Affects Versions: 6.0.0
> Reporter: Alessandro Molina
> Assignee: Alessandro Molina
> Priority: Major
> Labels: pull-request-available
> Fix For: 7.0.0
>
> Time Spent: 10h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)