issues: 48346240
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
48346240 | MDU6SXNzdWU0ODM0NjI0MA== | 278 | TypeError with to_dataframe and 0d string/object coordinates | 1217238 | closed | 0 | 0 | 2014-11-11T04:13:21Z | 2014-12-07T06:22:47Z | 2014-12-07T06:22:47Z | MEMBER |
results in: ``` TypeError Traceback (most recent call last) <ipython-input-261-6b1470f49b2d> in <module>() 1 obj = xray.Dataset({'x': pd.Index(['bar'])}).isel(x=0) ----> 2 obj.to_dataframe() /Users/shoyer/dev/xray/xray/core/dataset.pyc in to_dataframe(self) 1520 this dataset's indices. 1521 """ -> 1522 return self._to_dataframe(self.dims) 1523 1524 @classmethod /Users/shoyer/dev/xray/xray/core/dataset.pyc in _to_dataframe(self, ordered_dims) 1507 columns = [k for k in self if k not in self.dims] 1508 orig_arrays = (self._arrays[k] for k in columns) -> 1509 broadcast_arrays = variable.broadcast_variables(orig_arrays) 1510 data = [arr.transpose(ordered_dims).values.reshape(-1) 1511 for arr in broadcast_arrays] /Users/shoyer/dev/xray/xray/core/variable.pyc in broadcast_variables(variables) 891 and broadcast data. 892 """ --> 893 variables = _broadcast_compatible_variables(variables) 894 broadcast_data = np.broadcast_arrays(*[v.values for v in variables]) 895 for var, data in zip(variables, broadcast_data): /Users/shoyer/dev/xray/xray/core/variable.pyc in _broadcast_compatible_variables(*variables) 875 broadcast_vars = [] 876 for var in variables: --> 877 data = var.values[(Ellipsis,) + (None,) * (len(all_dims) - var.ndim)] 878 var_dims = set(var.dims) 879 dims = var.dims + tuple(d for d in all_dims if d not in var_dims) TypeError: string indices must be integers, not tuple ``` |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/278/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |