spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-19428) Ability to select first row of groupby
Date Sat, 04 Feb 2017 18:36:51 GMT

    [ https://issues.apache.org/jira/browse/SPARK-19428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852894#comment-15852894
] 

Hyukjin Kwon commented on SPARK-19428:
--------------------------------------

(FWIW, I think he meant...

{code}
>>> df = pandas.DataFrame(data)
>>> print(df.to_string)
<bound method DataFrame.to_string of    A  B
0  1  4
1  2  5
2  2  6
3  3  7
4  3  8
5  3  9>
>>> df.groupby("A").first()
   B
A
1  4
2  5
3  7
{code}

in pandas..)

> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message