html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/2461#issuecomment-557325065,https://api.github.com/repos/pydata/xarray/issues/2461,557325065,MDEyOklzc3VlQ29tbWVudDU1NzMyNTA2NQ==,14808389,2019-11-21T23:53:25Z,2019-11-21T23:53:25Z,MEMBER,just note that in the end the result is still 2D with the missing values filled with `nan`,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,366626025
https://github.com/pydata/xarray/issues/2461#issuecomment-557322577,https://api.github.com/repos/pydata/xarray/issues/2461,557322577,MDEyOklzc3VlQ29tbWVudDU1NzMyMjU3Nw==,14808389,2019-11-21T23:42:28Z,2019-11-21T23:42:28Z,MEMBER,"to get your example to work, use this:
```python
data=pd.DataFrame({'x': [0, 1, 2], 'y': ['a', 'b', 'c'],'z': ['a', 'b', 'c']})
xr.DataArray(data.x, coords={'y': data.y, 'x':data.z}, dims=""y"")
```
to get both as dimensions, use
```python
df = pd.DataFrame({'x': [0, 1, 2], 'y': ['a', 'b', 'c'],'z': ['a', 'b', 'c']})
ds = df.set_index([""y"", ""z""]).to_xarray()
```","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,366626025
https://github.com/pydata/xarray/issues/2461#issuecomment-557320245,https://api.github.com/repos/pydata/xarray/issues/2461,557320245,MDEyOklzc3VlQ29tbWVudDU1NzMyMDI0NQ==,2448579,2019-11-21T23:33:21Z,2019-11-21T23:33:21Z,MEMBER,"So that's not possible. You can't have both `y` and `z` be 1D coordinate variables for `x` since `x` is 1D.
What are you ultimately trying to do after the conversion to DataArray?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,366626025
https://github.com/pydata/xarray/issues/2461#issuecomment-557315718,https://api.github.com/repos/pydata/xarray/issues/2461,557315718,MDEyOklzc3VlQ29tbWVudDU1NzMxNTcxOA==,2448579,2019-11-21T23:17:31Z,2019-11-21T23:17:31Z,MEMBER,"`ds.rename_dims({""i"": ""y""})`

Is this what you want?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,366626025
https://github.com/pydata/xarray/issues/2461#issuecomment-426906908,https://api.github.com/repos/pydata/xarray/issues/2461,426906908,MDEyOklzc3VlQ29tbWVudDQyNjkwNjkwOA==,6815844,2018-10-04T06:59:56Z,2018-10-04T06:59:56Z,MEMBER,"> It might be worth putting a ""see also"" note in the assign_coords and set_coords documentation for this. I tried searching quite a bit, but did not find this.
Thanks for the suggestion. It sounds a good idea. Do you mind to send a PR for this?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,366626025
https://github.com/pydata/xarray/issues/2461#issuecomment-426898980,https://api.github.com/repos/pydata/xarray/issues/2461,426898980,MDEyOklzc3VlQ29tbWVudDQyNjg5ODk4MA==,6815844,2018-10-04T06:22:03Z,2018-10-04T06:22:03Z,MEMBER,"I'm closing this issue, but if you have further issue, do not hesitate to reopen this. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,366626025
https://github.com/pydata/xarray/issues/2461#issuecomment-426898835,https://api.github.com/repos/pydata/xarray/issues/2461,426898835,MDEyOklzc3VlQ29tbWVudDQyNjg5ODgzNQ==,6815844,2018-10-04T06:21:23Z,2018-10-04T06:21:23Z,MEMBER,"Hi @nedclimaterisk.
Thanks for the raising an issue.
In that case, you can use [`swap_dims`](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.swap_dims.html),
```python
In [1]: import xarray as xr
...: ds = xr.Dataset({'x': ('i', [0, 1, 2]), 'y': ('i', ['a', 'b', 'c'])})
...: ds
...:
...:
Out[1]:
Dimensions: (i: 3)
Dimensions without coordinates: i
Data variables:
x (i) int64 0 1 2
y (i)
Dimensions: (x: 3)
Coordinates:
* x (x) int64 0 1 2
Data variables:
y (x)