{"issue":{"state":"closed","created_at":"2011-10-25T11:46:37Z","updated_at":"2011-11-25T20:12:56Z","user":{"gravatar_id":"468f540caebe33dee286d9e09603e462","id":1094464,"url":"https://api.github.com/users/lodagro","login":"lodagro","avatar_url":"https://secure.gravatar.com/avatar/468f540caebe33dee286d9e09603e462?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":3,"body":"Hi Wess,\r\n\r\nPull request to let you know that i added argmin and argmax methods to Series and DataFrame.\r\nI also included unit tests. It`s not that much work/code, but anyway an interesting enhancement i think.\r\n\r\nsome examples:\r\nIn [23]: s\r\nOut[23]:\r\na    0.80015881463\r\nb    0.983432892599\r\nc    0.965122593504\r\nd    0.81910825442\r\ne    0.726239458506\r\nName: None, Length: 5\r\n\r\nIn [24]: s.argmin()\r\nOut[24]: 'e'\r\n\r\nIn [25]: s[s.argmax()] == s.max()\r\nOut[25]: True\r\n\r\nIn [26]: df\r\nOut[26]:\r\n               A       B       C        D       E\r\none two three\r\na   b   10    -0.6155  1.237   1.371    1.24   -0.7725\r\np   q   20     1.14   -0.3743  0.5251   0.2426  1.81\r\nx   y   30     0.6626  2.004  -0.01327  1.587   0.3524\r\n\r\nIn [27]: df.argmax(axis=0)\r\nOut[27]:\r\nA    ('p', 'q', 20)\r\nB    ('x', 'y', 30)\r\nC    ('a', 'b', 10)\r\nD    ('x', 'y', 30)\r\nE    ('p', 'q', 20)\r\nName: None, Length: 5\r\n\r\nIn [28]: df.argmin(axis=1)\r\nOut[28]:\r\na  b  10    E\r\np  q  20    B\r\nx  y  30    C\r\nName: None, Length: 3\r\n\r\nWhat do you think?\r\n\r\nWouter\r\n\r\n","assignee":null,"id":2044131,"pull_request":{"patch_url":"https://github.com/wesm/pandas/pull/286.patch","html_url":"https://github.com/wesm/pandas/pull/286","diff_url":"https://github.com/wesm/pandas/pull/286.diff"},"labels":[],"number":286,"title":"ENH: Adding argmin, argmax to Series and DataFrame.","closed_at":"2011-11-14T07:22:04Z","html_url":"https://github.com/wesm/pandas/issues/286","url":"https://api.github.com/repos/wesm/pandas/issues/286","milestone":null},"action":"created","comment":{"created_at":"2011-11-25T20:12:56Z","updated_at":"2011-11-25T20:12:56Z","user":{"gravatar_id":"2c08a3eed709a9d1a2654cea45aa466f","id":329591,"url":"https://api.github.com/users/wesm","login":"wesm","avatar_url":"https://secure.gravatar.com/avatar/2c08a3eed709a9d1a2654cea45aa466f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I made some changes to NA-handling in these functions to be consistent with the other reductions, particularly when `skipna=False`:\r\n\r\nhttps://github.com/wesm/pandas/commit/c1307b68d5cc16848be832db67937fd9e639800e","id":2877766,"url":"https://api.github.com/repos/wesm/pandas/issues/comments/2877766"}}