issues: 1429172192
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1429172192 | I_kwDOAMm_X85VL2_g | 7239 | include/exclude lists in Dataset.expand_dims | 90008 | closed | 0 | 6 | 2022-10-31T03:01:52Z | 2023-11-05T06:29:06Z | 2023-11-05T06:29:06Z | CONTRIBUTOR | Is your feature request related to a problem?I would like to be able to expand the dimensions of a dataset, but most of the time, I only want to expand the datasets of a few key variables. It would be nice if there were some kind of filter mechanism. Describe the solution you'd like```python import xarray as xr dataset = xr.Dataset(data_vars={'foo': 1, 'bar': 2}) dataset.expand_dims("zar", include_variables=["foo"]) Only foo is expanded, bar is left alone.``` Describe alternatives you've consideredWriting my own function. I'll probably do this. Subclassing. Too confusing and easy to "diverge" from you all when you do decide to implment this. Additional contextFor large datasets, you likely just want some key parameters expanded, and not all parameters expanded. xarray version: 2022.10.0 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7239/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |