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/2496#issuecomment-465060211,https://api.github.com/repos/pydata/xarray/issues/2496,465060211,MDEyOklzc3VlQ29tbWVudDQ2NTA2MDIxMQ==,6815844,2019-02-19T09:42:51Z,2019-02-19T09:42:51Z,MEMBER,It was fixed by #2619,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,372006204
https://github.com/pydata/xarray/issues/2496#issuecomment-431864845,https://api.github.com/repos/pydata/xarray/issues/2496,431864845,MDEyOklzc3VlQ29tbWVudDQzMTg2NDg0NQ==,1217238,2018-10-22T15:14:42Z,2018-10-22T15:14:42Z,MEMBER,"I suppose we could use [`MultiIndex.remove_unused_levels()`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.remove_unused_levels.html#pandas-multiindex-remove-unused-levels) when unstacking -- this appears to be what pandas does:
```
>>> df2.unstack()
cols col
idx2 x y z
idx1
a -1.470914 -0.093633 1.211639
b 0.587716 1.425005 0.106892
```
I'll mark this as a bug, though it's also a bit of a backwards incompatible change. Any interest in putting together a PR? :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,372006204