{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/14903","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/14903/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/14903/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/14903/events","html_url":"https://github.com/pandas-dev/pandas/issues/14903","id":196234743,"number":14903,"title":"DataFrame.to_xarray() is sorting dimensional coordinates","user":{"login":"ucyo","id":591458,"avatar_url":"https://avatars.githubusercontent.com/u/591458?v=3","gravatar_id":"","url":"https://api.github.com/users/ucyo","html_url":"https://github.com/ucyo","followers_url":"https://api.github.com/users/ucyo/followers","following_url":"https://api.github.com/users/ucyo/following{/other_user}","gists_url":"https://api.github.com/users/ucyo/gists{/gist_id}","starred_url":"https://api.github.com/users/ucyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucyo/subscriptions","organizations_url":"https://api.github.com/users/ucyo/orgs","repos_url":"https://api.github.com/users/ucyo/repos","events_url":"https://api.github.com/users/ucyo/events{/privacy}","received_events_url":"https://api.github.com/users/ucyo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-17T18:07:18Z","updated_at":"2016-12-17T18:10:10Z","closed_at":null,"body":"#### Code Sample, a copy-pastable example if possible\r\n\r\n```python\r\nimport pandas as pd\r\nimport xarray as xr\r\nimport numpy as np\r\n\r\nrd = np.zeros((4,4), dtype=np.float64)\r\nlag = np.arange(4)[::-1]\r\n# lag = np.random.randn(4) \r\nlev = np.arange(4)\r\n\r\niterables = [lag, lev]\r\nindex = pd.MultiIndex.from_product(iterables, names=['lag','lev'])\r\nsolution = pd.DataFrame(data=rd.reshape(rd.size, 1),index=index)\r\nsolution.columns = ['tmp']\r\n\r\nsolution.to_xarray()\r\n\r\n```\r\n#### Problem description\r\n\r\nThe dimensions of the generated `xarray.Dataset` is sorted in ascending order for `lag`.\r\nThis is true for any entry (like the commented out `np.random.randn(4)` line)\r\n\r\n#### Expected Output\r\n\r\nOutput should be the same as Input.\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 3.4.5.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 3.10.0-327.22.2.el7.x86_64\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: en_US.UTF-8\r\nLANG: en_US.UTF-8\r\nLOCALE: en_US.UTF-8\r\n\r\npandas: 0.19.1\r\nnose: None\r\npip: 9.0.1\r\nsetuptools: 30.2.0\r\nCython: None\r\nnumpy: 1.11.2\r\nscipy: 0.18.1\r\nstatsmodels: None\r\nxarray: 0.8.2\r\nIPython: 5.1.0\r\nsphinx: None\r\npatsy: None\r\ndateutil: 2.6.0\r\npytz: 2016.10\r\nblosc: None\r\nbottleneck: None\r\ntables: None\r\nnumexpr: None\r\nmatplotlib: 1.5.3\r\nopenpyxl: None\r\nxlrd: None\r\nxlwt: None\r\nxlsxwriter: None\r\nlxml: None\r\nbs4: None\r\nhtml5lib: None\r\nhttplib2: None\r\napiclient: None\r\nsqlalchemy: None\r\npymysql: None\r\npsycopg2: None\r\njinja2: 2.8\r\nboto: None\r\npandas_datareader: None\r\n</details>\r\n"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/267777718","html_url":"https://github.com/pandas-dev/pandas/issues/14903#issuecomment-267777718","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/14903","id":267777718,"user":{"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},"created_at":"2016-12-17T18:10:10Z","updated_at":"2016-12-17T18:10:10Z","body":"cc @MaximilianR \r\n@shoyer "}}
{"actor":{"display_login":"jreback"}}