home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1261015002

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/7099#issuecomment-1261015002 https://api.github.com/repos/pydata/xarray/issues/7099 1261015002 IC_kwDOAMm_X85LKY_a 4160723 2022-09-28T14:39:10Z 2022-09-28T14:39:10Z MEMBER

Or use Indexer objects to group labels + options? This is slightly different than what you suggest:

```python class Dataset:

def sel(
    self,
    indexers: Mapping[Any, Any] | Indexer | Iterable[Indexer],
    **indexers_kwargs: Any,
):
    ...

class Indexer: def init(self, labels=None, options=None, **label_kwargs): ... ```

Let's assume a Dataset with lat / lon coordinates both sharing the same geographic index + another time dimension coordinate, then we could write:

```python indexers = [ Indexer(lon=[2, 15], lat=[45, 48], options={"foo": "bar"}), Indexer(time="2022-01-01"), ]

ds.sel(indexers) ```

This could also be used to avoid code duplication when using common selection options for different indexes.

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