home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 84068169 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • shoyer 2
  • mathause 2
  • max-sixty 1

issue 1

  • select range/ slice with method='nearest' · 5 ✖

author_association 1

  • MEMBER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
454533545 https://github.com/pydata/xarray/issues/418#issuecomment-454533545 https://api.github.com/repos/pydata/xarray/issues/418 MDEyOklzc3VlQ29tbWVudDQ1NDUzMzU0NQ== max-sixty 5635139 2019-01-15T20:10:19Z 2019-01-15T20:10:19Z MEMBER

Closing as stale, please reopen if still relevant

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  select range/ slice with method='nearest' 84068169
111943792 https://github.com/pydata/xarray/issues/418#issuecomment-111943792 https://api.github.com/repos/pydata/xarray/issues/418 MDEyOklzc3VlQ29tbWVudDExMTk0Mzc5Mg== mathause 10194086 2015-06-15T06:17:41Z 2015-06-15T06:17:41Z MEMBER

ok thank you for looking at it and the clarification.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  select range/ slice with method='nearest' 84068169
111630149 https://github.com/pydata/xarray/issues/418#issuecomment-111630149 https://api.github.com/repos/pydata/xarray/issues/418 MDEyOklzc3VlQ29tbWVudDExMTYzMDE0OQ== shoyer 1217238 2015-06-12T22:07:30Z 2015-06-12T22:09:16Z MEMBER

I just clarified this in the docs: http://xray.readthedocs.org/en/stable/indexing.html#nearest-neighbor-lookups

Let me know if that makes sense -- hopefully it's clear now that you actually don't need method='nearest' most use cases. As for your hack, I'm reluctant to support method='nearest' with label based slicing without the upstream functionality in pandas -- which would need to go in Index.slice_locs/Index.slice_indexer: https://github.com/pydata/pandas/blob/be5ad4abcb9d8385110831edd138c1f644fe83ae/pandas/core/index.py#L2457

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  select range/ slice with method='nearest' 84068169
108119362 https://github.com/pydata/xarray/issues/418#issuecomment-108119362 https://api.github.com/repos/pydata/xarray/issues/418 MDEyOklzc3VlQ29tbWVudDEwODExOTM2Mg== shoyer 1217238 2015-06-02T22:43:38Z 2015-06-02T22:43:38Z MEMBER

ds.sel(lat=slice(30, 50)) will work to select all values inside interval [30, 50] already -- the values don't have to match exactly. This should probably be noted in the docs.

This inconsistency is definitely a little annoying, though -- I don't see any harm in support nearest neighbor lookups for the bounds.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  select range/ slice with method='nearest' 84068169
108014220 https://github.com/pydata/xarray/issues/418#issuecomment-108014220 https://api.github.com/repos/pydata/xarray/issues/418 MDEyOklzc3VlQ29tbWVudDEwODAxNDIyMA== mathause 10194086 2015-06-02T16:57:52Z 2015-06-02T16:58:52Z MEMBER

I did a short hack - not sure if it is of any help...

420

import numpy as np import xray temp = 15 + 8 * np.random.randn(20) lat = np.arange(0, 20) ds = xray.Dataset({'temperature': ('lat', temp)}, coords={'lat' : lat}) ds.sel(lat=slice(1.2, 5.9)) # lat = 2 3 4 5 ds.sel(lat=slice(1.2, 5.9), method='nearest') # lat = 1 2 3 4 5 6

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  select range/ slice with method='nearest' 84068169

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 11.012ms · About: xarray-datasette