home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 1389295853 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 2

  • benbovy 3
  • keewis 1

issue 1

  • Pass arbitrary options to sel() · 4 ✖

author_association 1

  • MEMBER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1261015002 https://github.com/pydata/xarray/issues/7099#issuecomment-1261015002 https://api.github.com/repos/pydata/xarray/issues/7099 IC_kwDOAMm_X85LKY_a benbovy 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
}
  Pass arbitrary options to sel() 1389295853
1260905662 https://github.com/pydata/xarray/issues/7099#issuecomment-1260905662 https://api.github.com/repos/pydata/xarray/issues/7099 IC_kwDOAMm_X85LJ-S- keewis 14808389 2022-09-28T13:20:38Z 2022-09-28T13:20:38Z MEMBER

another option would be to allow passing a custom object, like ```python class Indexer: def init(self, indexer, **options): ...

ds.sel(x=Indexer([0, 2], method="nearest")) ```

I think we wanted to have something like that, anyways, to be able to specify other behaviors of a slice, like right-exclusive?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pass arbitrary options to sel() 1389295853
1260892017 https://github.com/pydata/xarray/issues/7099#issuecomment-1260892017 https://api.github.com/repos/pydata/xarray/issues/7099 IC_kwDOAMm_X85LJ69x benbovy 4160723 2022-09-28T13:11:01Z 2022-09-28T13:11:01Z MEMBER

Or we could simply decide that .sel() should not accept arbitrary options and handle special cases, e.g., via accessors.

It would actually make sense to have something like .my_accessor.sel_k_neighbors(). Not so great to have a separate method just for an optimization option, though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pass arbitrary options to sel() 1389295853
1260859023 https://github.com/pydata/xarray/issues/7099#issuecomment-1260859023 https://api.github.com/repos/pydata/xarray/issues/7099 IC_kwDOAMm_X85LJy6P benbovy 4160723 2022-09-28T12:50:25Z 2022-09-28T12:50:25Z MEMBER

Another difficulty regarding multi-coordinate indexes: ideally options should be set per index, not per coordinate.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pass arbitrary options to sel() 1389295853

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 4638.844ms · About: xarray-datasette