issues: 659232211
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 659232211 | MDExOlB1bGxSZXF1ZXN0NDUxMTAzOTk5 | 4237 | per-variable fill values | 14808389 | closed | 0 | 13 | 2020-07-17T12:52:17Z | 2020-08-24T22:14:27Z | 2020-08-24T22:03:15Z | MEMBER | 0 | pydata/xarray/pulls/4237 | This allows specifying different fill values per variable, defaulting to Here's a demo on how this works:```python In [3]: ds = xr.Dataset( ...: {"a": ("x", [2, 3]), "b": ("x", [-9, 4])}, ...: coords={"x": [0, 1], "u": ("x", ["a", "b"])}, ...: ) ...: ds Out[3]: <xarray.Dataset> Dimensions: (x: 2) Coordinates: * x (x) int64 0 1 u (x) <U1 'a' 'b' Data variables: a (x) int64 2 3 b (x) int64 -9 4 In [4]: ds.reindex(x=[-1, 0]) Out[4]: <xarray.Dataset> Dimensions: (x: 2) Coordinates: * x (x) int64 -1 0 u (x) object nan 'a' Data variables: a (x) float64 nan 2.0 b (x) float64 nan -9.0 In [5]: ds.reindex(x=[-1, 0], fill_value={"u": "z", "a": 10}) Out[5]: <xarray.Dataset> Dimensions: (x: 2) Coordinates: * x (x) int64 -1 0 u (x) <U1 'z' 'a' Data variables: a (x) int64 10 2 b (x) float64 nan -9.0 ``` </details>
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/4237/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
13221727 | pull |