How to sort s SFrame according to more than one attribute?

User 490 | 7/21/2014, 11:05:53 PM

In http://graphlab.com/learn/notebooks/followthecryptocurrency.html I tried to sort the sf by transactioncount = gl.SFrame(transactioncount.topk('month', k=nmonth, reverse=True)).topk('year', k=nmonth, reverse=True) But when I looked at the result only the year is sorted the months seemed readom like:

06 2009 10 2009 05 2009 ... 12 2010 07 2010 09 2010 ...

not as expected 05 2009 06 2009 10 2009 ... 07 2010 09 2010 12 2010 ...

How can sort it correctly?

Comments

User 91 | 7/22/2014, 7:09:01 AM

The code examples in the following link should be able to guide you.

http://graphlab.com/products/create/docs/generated/graphlab.SFrame.sort.html#graphlab.SFrame.sort


User 490 | 7/22/2014, 5:42:39 PM

Thx man! It works