{"action":"created","issue":{"url":"https://api.github.com/repos/blaze/dask/issues/683","labels_url":"https://api.github.com/repos/blaze/dask/issues/683/labels{/name}","comments_url":"https://api.github.com/repos/blaze/dask/issues/683/comments","events_url":"https://api.github.com/repos/blaze/dask/issues/683/events","html_url":"https://github.com/blaze/dask/pull/683","id":105470355,"number":683,"title":"Add dask.dataframe.nlargest","user":{"login":"cowlicks","id":598099,"avatar_url":"https://avatars.githubusercontent.com/u/598099?v=3","gravatar_id":"","url":"https://api.github.com/users/cowlicks","html_url":"https://github.com/cowlicks","followers_url":"https://api.github.com/users/cowlicks/followers","following_url":"https://api.github.com/users/cowlicks/following{/other_user}","gists_url":"https://api.github.com/users/cowlicks/gists{/gist_id}","starred_url":"https://api.github.com/users/cowlicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowlicks/subscriptions","organizations_url":"https://api.github.com/users/cowlicks/orgs","repos_url":"https://api.github.com/users/cowlicks/repos","events_url":"https://api.github.com/users/cowlicks/events{/privacy}","received_events_url":"https://api.github.com/users/cowlicks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-08T21:14:38Z","updated_at":"2015-09-08T22:42:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/blaze/dask/pulls/683","html_url":"https://github.com/blaze/dask/pull/683","diff_url":"https://github.com/blaze/dask/pull/683.diff","patch_url":"https://github.com/blaze/dask/pull/683.patch"},"body":"closes #317\r\n\r\nNote that this duplicates pandas behavior, which I think is a bit unexpected. The dataframe is sorted by the `nlargest` elements of the first thing in the `columns` argument that is passed in, then all the columns are returned. Not just the ones in `columns`.\r\n```python\r\nIn [1]: import pandas; from string import ascii_lowercase; import numpy as np\r\n\r\nIn [2]: a = pandas.DataFrame({'a': np.random.permutation(10),\r\n'b': list(ascii_lowercase[:10]),\r\n'c': np.random.permutation(10).astype('float64')})\r\n\r\nIn [3]: a.nlargest(5, 'a')\r\nOut[3]: \r\n   a  b  c\r\n2  9  c  2\r\n4  8  e  3\r\n6  7  g  9\r\n3  6  d  5\r\n7  5  h  7\r\n\r\nIn [4]: a.nlargest(5, ['a', 'b'])\r\nOut[4]: \r\n   a  b  c\r\n2  9  c  2\r\n4  8  e  3\r\n6  7  g  9\r\n3  6  d  5\r\n7  5  h  7\r\n```"},"comment":{"url":"https://api.github.com/repos/blaze/dask/issues/comments/138724002","html_url":"https://github.com/blaze/dask/pull/683#issuecomment-138724002","issue_url":"https://api.github.com/repos/blaze/dask/issues/683","id":138724002,"user":{"login":"cowlicks","id":598099,"avatar_url":"https://avatars.githubusercontent.com/u/598099?v=3","gravatar_id":"","url":"https://api.github.com/users/cowlicks","html_url":"https://github.com/cowlicks","followers_url":"https://api.github.com/users/cowlicks/followers","following_url":"https://api.github.com/users/cowlicks/following{/other_user}","gists_url":"https://api.github.com/users/cowlicks/gists{/gist_id}","starred_url":"https://api.github.com/users/cowlicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowlicks/subscriptions","organizations_url":"https://api.github.com/users/cowlicks/orgs","repos_url":"https://api.github.com/users/cowlicks/repos","events_url":"https://api.github.com/users/cowlicks/events{/privacy}","received_events_url":"https://api.github.com/users/cowlicks/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T22:42:51Z","updated_at":"2015-09-08T22:42:51Z","body":"done"}}