{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/9212","labels_url":"https://api.github.com/repos/pydata/pandas/issues/9212/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/9212/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/9212/events","html_url":"https://github.com/pydata/pandas/issues/9212","id":53730230,"number":9212,"title":"sort_index behavior differs for the same DataFrame?","user":{"login":"tlmaloney","id":1243750,"avatar_url":"https://avatars.githubusercontent.com/u/1243750?v=3","gravatar_id":"","url":"https://api.github.com/users/tlmaloney","html_url":"https://github.com/tlmaloney","followers_url":"https://api.github.com/users/tlmaloney/followers","following_url":"https://api.github.com/users/tlmaloney/following{/other_user}","gists_url":"https://api.github.com/users/tlmaloney/gists{/gist_id}","starred_url":"https://api.github.com/users/tlmaloney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlmaloney/subscriptions","organizations_url":"https://api.github.com/users/tlmaloney/orgs","repos_url":"https://api.github.com/users/tlmaloney/repos","events_url":"https://api.github.com/users/tlmaloney/events{/privacy}","received_events_url":"https://api.github.com/users/tlmaloney/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/API%20Design","name":"API Design","color":"AD7FA8"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Enhancement","name":"Enhancement","color":"4E9A06"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/32","html_url":"https://github.com/pydata/pandas/milestones/Next%20Major%20Release","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/32/labels","id":933188,"number":32,"title":"Next Major Release","description":"after 0.16.1 of course","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":804,"closed_issues":45,"state":"open","created_at":"2015-01-13T10:53:19Z","updated_at":"2015-06-05T13:13:09Z","due_on":"2015-08-31T04:00:00Z","closed_at":null},"comments":24,"created_at":"2015-01-08T09:28:20Z","updated_at":"2015-06-05T13:27:31Z","closed_at":null,"body":"I feel like I've encountered a bug. In the following scenario, the first `sort_index` call behaves as expected, but the second does not. Does someone know what the difference is here?\r\n\r\n```\r\nIn [1]: import pandas as pd\r\n\r\nIn [2]: pd.__version__\r\nOut[2]: '0.15.2'\r\n\r\nIn [3]: tuples = [(' foo', 'bar'), ('foo', 'bar'), (' foo ()', 'bar')]\r\n\r\nIn [4]: cols = pd.MultiIndex.from_tuples(tuples)\r\n\r\nIn [5]: df = pd.DataFrame(index=cols, data={'baz': [0, 1, 2]})\r\n\r\nIn [6]: df\r\nOut[6]: \r\n             baz\r\n foo    bar    0\r\nfoo     bar    1\r\n foo () bar    2\r\n\r\nIn [7]: df.sort_index()\r\nOut[7]: \r\n             baz\r\n foo    bar    0\r\n foo () bar    2\r\nfoo     bar    1\r\n\r\nIn [8]: tuples = [(' foo', 'bar'), ('foo', 'bar')]\r\n\r\nIn [9]: cols = pd.MultiIndex.from_tuples(tuples)\r\n\r\nIn [10]: df = pd.DataFrame(index=cols, data={'baz': [0, 1]})\r\n\r\nIn [11]: df\r\nOut[11]: \r\n          baz\r\n foo bar    0\r\nfoo  bar    1\r\n\r\nIn [12]: df.ix[(' foo ()', 'bar'), 'baz'] = 2\r\n\r\nIn [13]: df\r\nOut[13]: \r\n             baz\r\n foo    bar    0\r\nfoo     bar    1\r\n foo () bar    2\r\n\r\nIn [14]: df.sort_index()\r\nOut[14]: \r\n             baz\r\n foo    bar    0\r\nfoo     bar    1\r\n foo () bar    2\r\n```"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/109292470","html_url":"https://github.com/pydata/pandas/issues/9212#issuecomment-109292470","issue_url":"https://api.github.com/repos/pydata/pandas/issues/9212","id":109292470,"user":{"login":"8one6","id":4360170,"avatar_url":"https://avatars.githubusercontent.com/u/4360170?v=3","gravatar_id":"","url":"https://api.github.com/users/8one6","html_url":"https://github.com/8one6","followers_url":"https://api.github.com/users/8one6/followers","following_url":"https://api.github.com/users/8one6/following{/other_user}","gists_url":"https://api.github.com/users/8one6/gists{/gist_id}","starred_url":"https://api.github.com/users/8one6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/8one6/subscriptions","organizations_url":"https://api.github.com/users/8one6/orgs","repos_url":"https://api.github.com/users/8one6/repos","events_url":"https://api.github.com/users/8one6/events{/privacy}","received_events_url":"https://api.github.com/users/8one6/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T13:27:31Z","updated_at":"2015-06-05T13:27:31Z","body":"What's the status on this one now?  Is anyone actively working on a fix of the underlying issue? And, separately, is there any workaround for when \"you just need to get the darn dataframe sorted\" while we wait for/work on a more permanent fix for sorting?"}}