{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/10145","labels_url":"https://api.github.com/repos/pydata/pandas/issues/10145/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10145/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/10145/events","html_url":"https://github.com/pydata/pandas/issues/10145","id":76685752,"number":10145,"title":"DOC: add nlargest/nsmallest to API.rst","user":{"login":"RomanPekar","id":1523574,"avatar_url":"https://avatars.githubusercontent.com/u/1523574?v=3","gravatar_id":"","url":"https://api.github.com/users/RomanPekar","html_url":"https://github.com/RomanPekar","followers_url":"https://api.github.com/users/RomanPekar/followers","following_url":"https://api.github.com/users/RomanPekar/following{/other_user}","gists_url":"https://api.github.com/users/RomanPekar/gists{/gist_id}","starred_url":"https://api.github.com/users/RomanPekar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomanPekar/subscriptions","organizations_url":"https://api.github.com/users/RomanPekar/orgs","repos_url":"https://api.github.com/users/RomanPekar/repos","events_url":"https://api.github.com/users/RomanPekar/events{/privacy}","received_events_url":"https://api.github.com/users/RomanPekar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Difficulty%20Novice","name":"Difficulty Novice","color":"fbca04"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Docs","name":"Docs","color":"3465A4"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/34","html_url":"https://github.com/pydata/pandas/milestones/0.17.0","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/34/labels","id":1033710,"number":34,"title":"0.17.0","description":"","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":113,"closed_issues":16,"state":"open","created_at":"2015-03-23T10:47:38Z","updated_at":"2015-05-15T12:00:26Z","due_on":"2015-06-30T04:00:00Z","closed_at":null},"comments":4,"created_at":"2015-05-15T10:34:53Z","updated_at":"2015-05-15T12:35:26Z","closed_at":null,"body":"At the moment there's no easy way to partially sort the DataFrame to get top N rows, could be useful feature.\r\n\r\nThere's partial sorting available for numpy within the [bottleneck](http://berkeleyanalytics.com/bottleneck/reference.html#bottleneck.partsort) library.\r\n\r\nHere's link to SO question about numpy partial sort - http://stackoverflow.com/questions/10337533/a-fast-way-to-find-the-largest-n-elements-in-an-numpy-array"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/102386920","html_url":"https://github.com/pydata/pandas/issues/10145#issuecomment-102386920","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10145","id":102386920,"user":{"login":"RomanPekar","id":1523574,"avatar_url":"https://avatars.githubusercontent.com/u/1523574?v=3","gravatar_id":"","url":"https://api.github.com/users/RomanPekar","html_url":"https://github.com/RomanPekar","followers_url":"https://api.github.com/users/RomanPekar/followers","following_url":"https://api.github.com/users/RomanPekar/following{/other_user}","gists_url":"https://api.github.com/users/RomanPekar/gists{/gist_id}","starred_url":"https://api.github.com/users/RomanPekar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomanPekar/subscriptions","organizations_url":"https://api.github.com/users/RomanPekar/orgs","repos_url":"https://api.github.com/users/RomanPekar/repos","events_url":"https://api.github.com/users/RomanPekar/events{/privacy}","received_events_url":"https://api.github.com/users/RomanPekar/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T12:35:26Z","updated_at":"2015-05-15T12:35:26Z","body":"Thanks again, but it still will not work if I want to sort by several columns. As an example - suppose I have this dataset:\r\n\r\n\t\tA\tB\r\n\t0\t1\t5\r\n\t1\t2\t5\r\n\t2\t2\t4\r\n\t3\t2\t3\r\n\t4\t3\t2\r\n\t5\t3\t1\r\n\r\nAnd I want to take top 4 records ordered by `A desc`, `B desc` (rows 5, 4, 1, 2)"}}