issues: 561539035
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 561539035 | MDU6SXNzdWU1NjE1MzkwMzU= | 3761 | to_dataframe fails if dataarray has dimension 1 | 743508 | open | 0 | 2 | 2020-02-07T10:05:47Z | 2020-02-07T16:37:05Z | CONTRIBUTOR | The MCVE Code Sample```python Your code herex = np.arange(10) y = np.arange(10) data = np.zeros((len(x), len(y))) da = xr.DataArray(data, coords=[x, y], dims=['x', 'y']) da.sel(x=1,y=1).to_dataframe(name='test') ``` Expected OutputExpect a dataframe with one row Problem DescriptionThis happened when selecting a single value out of a gridded dataset - in cases where there was only one value output the to_dataframe failed. Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/3761/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
13221727 | issue |