issue_comments: 632639967
This data as json
| 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/4087#issuecomment-632639967 | https://api.github.com/repos/pydata/xarray/issues/4087 | 632639967 | MDEyOklzc3VlQ29tbWVudDYzMjYzOTk2Nw== | 14808389 | 2020-05-22T11:19:10Z | 2020-05-22T11:24:11Z | MEMBER | that's strange. If I run it, I get ```python In [1]: import pandas as pd ...: import xarray as xr In [2]: data3 = pd.DataFrame([(1, 2, 1), (2, 2, 1)],columns=['x', 'B', 'A'])
...: data3 = data3.set_index(['x'])
...: data3.rename_axis('tag', axis=1, inplace=True)
...: data3 = data3.stack()
...: In [3]: xr.DataArray.from_series(data3).sel(tag='B') Out[3]: <xarray.DataArray (x: 2)> array([2, 2]) Coordinates: * x (x) int64 1 2 tag <U1 'B' ``` which I believe is what you expect. Edit: could you try updating |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
623131373 |