home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 260137121

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/1072#issuecomment-260137121 https://api.github.com/repos/pydata/xarray/issues/1072 260137121 MDEyOklzc3VlQ29tbWVudDI2MDEzNzEyMQ== 5572303 2016-11-12T17:48:08Z 2016-11-12T17:48:08Z CONTRIBUTOR

hmm, so what would be an expected behavior of ds.combine_first?

If I have

```

ds0 <xarray.Dataset> Dimensions: (x: 2, y: 2) Coordinates: * x (x) |S1 'a' 'b' * y (y) int64 -1 0 Data variables: ds0 (x, y) int64 0 0 0 0 ds1 <xarray.Dataset> Dimensions: (x: 2, y: 2) Coordinates: * x (x) |S1 'b' 'c' * y (y) int64 0 1 Data variables: ds1 (x, y) int64 1 1 1 1 ```

I get

```

ds0.combine_first(ds1) <xarray.Dataset> Dimensions: (x: 3, y: 3) Coordinates: * x (x) object 'a' 'b' 'c' * y (y) int64 -1 0 1 Data variables: ds0 (x, y) float64 0.0 0.0 nan 0.0 0.0 nan nan nan nan ds1 (x, y) float64 nan nan nan nan 1.0 1.0 nan 1.0 1.0 ```

and changing the order to ds1.combine_first(ds0) just flips the order of the data_vars, but the cell values of the data_vars remain the same.

This is done essentially by adding a _combine_first to ops.py that mimics _fillna, except join='outer'.

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