home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 426898835

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/2461#issuecomment-426898835 https://api.github.com/repos/pydata/xarray/issues/2461 426898835 MDEyOklzc3VlQ29tbWVudDQyNjg5ODgzNQ== 6815844 2018-10-04T06:21:23Z 2018-10-04T06:21:23Z MEMBER

Hi @nedclimaterisk. Thanks for the raising an issue.

In that case, you can use swap_dims,

```python In [1]: import xarray as xr ...: ds = xr.Dataset({'x': ('i', [0, 1, 2]), 'y': ('i', ['a', 'b', 'c'])}) ...: ds ...: ...: Out[1]: <xarray.Dataset> Dimensions: (i: 3) Dimensions without coordinates: i Data variables: x (i) int64 0 1 2 y (i) <U1 'a' 'b' 'c'

In [2]: ds.swap_dims({'i': 'x'}) Out[2]: <xarray.Dataset> Dimensions: (x: 3) Coordinates: * x (x) int64 0 1 2 Data variables: y (x) <U1 'a' 'b' 'c' ```

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  366626025
Powered by Datasette · Queries took 0.656ms · About: xarray-datasette