0

Hi I am new to Pandas and I am trying to figure out how do I group by a specific column and then sort by a column and convert the group object to panda data frame.

For example:

ID   DATE         NAME
a1   2017-11-02   Mark 
b1   2017-11-03   Nick
c1   2017-11-04   Paul
a1   2017-11-01   Seth
c1   2017-11-05   Tom
b1   2017-11-02   Jerry
a1   2017-11-04   Happy

and the output I am looking for is

ID   DATE        NAME
a1   2017-11-01  Seth
a1   2017-11-02  Mark
a1   2017-11-04  Happy
b1   2017-11-02  Jerry
b1   2017-11-03  Nick
c1   2017-11-04  Paul
c1   2017-11-05  Tom
Pragyan93
  • 701
  • 2
  • 9
  • 18

0 Answers0