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/2537#issuecomment-720612094,https://api.github.com/repos/pydata/xarray/issues/2537,720612094,MDEyOklzc3VlQ29tbWVudDcyMDYxMjA5NA==,5308236,2020-11-02T17:24:32Z,2020-11-02T17:24:32Z,NONE,still relevant,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,376953925
https://github.com/pydata/xarray/issues/2537#issuecomment-435676969,https://api.github.com/repos/pydata/xarray/issues/2537,435676969,MDEyOklzc3VlQ29tbWVudDQzNTY3Njk2OQ==,5308236,2018-11-04T15:04:03Z,2018-12-01T20:06:11Z,NONE,"I think the issue stems from [this line of code](https://github.com/pydata/xarray/blob/848d491826a746711265b42a12fec12611fe539a/xarray/core/dataset.py#L158). Removing it leads to the desired MultiIndex.
But I'm not sure if it leads to downstream issues, e.g selecting over coord1 then seems to also squeeze that dimension. Perhaps @benbovy and @jhamman can chime in as the owners of that line.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,376953925
https://github.com/pydata/xarray/issues/2537#issuecomment-435560123,https://api.github.com/repos/pydata/xarray/issues/2537,435560123,MDEyOklzc3VlQ29tbWVudDQzNTU2MDEyMw==,5308236,2018-11-03T04:37:52Z,2018-11-03T04:37:52Z,NONE,"I would expect the dimension to become a MultiIndex with a single coordinate:
```
array([0])
Coordinates:
* dim MultiIndex
coord (dim) int64 0
```
When there is more than one coordinate that is what happens, but not when there is only a single coordinate.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,376953925
https://github.com/pydata/xarray/issues/2537#issuecomment-435548784,https://api.github.com/repos/pydata/xarray/issues/2537,435548784,MDEyOklzc3VlQ29tbWVudDQzNTU0ODc4NA==,5308236,2018-11-03T01:04:50Z,2018-11-03T01:12:53Z,NONE,"Sorry I missed a line in the issue, added it now. You're right about the `.sel` -- since it does not operate on dimension levels by default, I manually set the index: `d.set_index(append=True, inplace=True, dim=['coord'])`. However, this now gets rid of the coordinate:
```
array([0])
Coordinates:
* dim (dim) int64 0
```
and thus `d.sel(coord=0)` does not work because the coord has been discarded.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,376953925