{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/4588","labels_url":"https://api.github.com/repos/pydata/pandas/issues/4588/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/4588/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/4588/events","html_url":"https://github.com/pydata/pandas/issues/4588","id":18183895,"number":4588,"title":"BUG: concat unwantedly sorts DataFrame column names if they differ","user":{"login":"smcinerney","id":1179309,"avatar_url":"https://avatars.githubusercontent.com/u/1179309?v=3","gravatar_id":"","url":"https://api.github.com/users/smcinerney","html_url":"https://github.com/smcinerney","followers_url":"https://api.github.com/users/smcinerney/followers","following_url":"https://api.github.com/users/smcinerney/following{/other_user}","gists_url":"https://api.github.com/users/smcinerney/gists{/gist_id}","starred_url":"https://api.github.com/users/smcinerney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcinerney/subscriptions","organizations_url":"https://api.github.com/users/smcinerney/orgs","repos_url":"https://api.github.com/users/smcinerney/repos","events_url":"https://api.github.com/users/smcinerney/events{/privacy}","received_events_url":"https://api.github.com/users/smcinerney/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/Reshaping","name":"Reshaping","color":"02d7e1"}],"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":900,"closed_issues":65,"state":"open","created_at":"2015-01-13T10:53:19Z","updated_at":"2015-08-26T15:09:11Z","due_on":"2015-11-30T05:00:00Z","closed_at":null},"comments":13,"created_at":"2013-08-16T23:30:10Z","updated_at":"2015-08-27T18:40:32Z","closed_at":null,"body":"When concat'ing DataFrames, the column names get alphanumerically sorted if there are any differences between them. If they're identical across DataFrames, they don't get sorted.\r\nThis sort is undocumented and unwanted. Certainly the default behavior should be no-sort.\r\n\r\n```python\r\ndf4a = DataFrame(columns=['C','B','D','A'], data=np.random.randn(3,4))\r\ndf4b = DataFrame(columns=['C','B','D','A'], data=np.random.randn(3,4))\r\ndf5  = DataFrame(columns=['C','B','E','D','A'], data=np.random.randn(3,5))\r\n\r\nprint \"Cols unsorted:\", concat([df4a,df4b])\r\n# Cols unsorted:           C         B         D         A\r\n\r\nprint \"Cols sorted\", concat([df4a,df5])\r\n# Cols sorted           A         B         C         D         E\r\n``'"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/135518440","html_url":"https://github.com/pydata/pandas/issues/4588#issuecomment-135518440","issue_url":"https://api.github.com/repos/pydata/pandas/issues/4588","id":135518440,"user":{"login":"Zenadix","id":7153514,"avatar_url":"https://avatars.githubusercontent.com/u/7153514?v=3","gravatar_id":"","url":"https://api.github.com/users/Zenadix","html_url":"https://github.com/Zenadix","followers_url":"https://api.github.com/users/Zenadix/followers","following_url":"https://api.github.com/users/Zenadix/following{/other_user}","gists_url":"https://api.github.com/users/Zenadix/gists{/gist_id}","starred_url":"https://api.github.com/users/Zenadix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zenadix/subscriptions","organizations_url":"https://api.github.com/users/Zenadix/orgs","repos_url":"https://api.github.com/users/Zenadix/repos","events_url":"https://api.github.com/users/Zenadix/events{/privacy}","received_events_url":"https://api.github.com/users/Zenadix/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T18:40:31Z","updated_at":"2015-08-27T18:40:31Z","body":"+1, I hate having the columns sorted after every `append`."}}