[
https://issues.apache.org/jira/browse/SPARK-19428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853214#comment-15853214
]
Sean Owen commented on SPARK-19428:
-----------------------------------
Yeah, I think it would require a custom aggregator after all as I don't think
there's a built-in that can do this. Not so hard to write as Kurt says but not
built in. If you really need this functionality now efficiently that's the way
to go.
> Ability to select first row of groupby
> --------------------------------------
>
> Key: SPARK-19428
> URL: https://issues.apache.org/jira/browse/SPARK-19428
> Project: Spark
> Issue Type: Brainstorming
> Components: SQL
> Affects Versions: 2.1.0
> Reporter: Luke Miner
> Priority: Minor
>
> It would be nice to be able to select the first row from {{GroupedData}}.
> Pandas has something like this:
> {{df.groupby('group').first()}}
> It's especially handy if you can order the group as well.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]