home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 238317455 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • jdossgollin 2
  • shoyer 1
  • dcherian 1
  • fmaussion 1

author_association 2

  • MEMBER 3
  • NONE 2

issue 1

  • More Robust Implementation of `slice` · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
481887208 https://github.com/pydata/xarray/issues/1465#issuecomment-481887208 https://api.github.com/repos/pydata/xarray/issues/1465 MDEyOklzc3VlQ29tbWVudDQ4MTg4NzIwOA== dcherian 2448579 2019-04-10T22:16:34Z 2019-04-10T22:16:34Z MEMBER

Closing in favour of #1613 which has more discussion.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More Robust Implementation of `slice` 238317455
311392162 https://github.com/pydata/xarray/issues/1465#issuecomment-311392162 https://api.github.com/repos/pydata/xarray/issues/1465 MDEyOklzc3VlQ29tbWVudDMxMTM5MjE2Mg== jdossgollin 11929622 2017-06-27T15:20:03Z 2017-06-27T15:20:03Z NONE

Definitely want to leave it up to you guys but agree that putting it in slice probably doesn't make sense. Adding something to .sel() would be a cool feature in the spirit of projects like Aospy, which try to minimize the amount code re-writing necessary for carrying out simple analysis on different datasets which are often organized in subtly different ways. Of course, it's pretty easy for users to implement this ourselves if we really need. Thanks for considering!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More Robust Implementation of `slice` 238317455
310884145 https://github.com/pydata/xarray/issues/1465#issuecomment-310884145 https://api.github.com/repos/pydata/xarray/issues/1465 MDEyOklzc3VlQ29tbWVudDMxMDg4NDE0NQ== shoyer 1217238 2017-06-25T05:45:30Z 2017-06-25T05:45:30Z MEMBER

I agree that this is somewhat surprising, but as @fmaussion points out this slicing behavior is consistent with pandas (and Python more generally, nothing that range(5)[3:1] is empty).

slice is a Python built-in, so we can't adjust it. What we could potentially do is add a new keyboard argument to .sel() (or add a new indexing method entirely).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More Robust Implementation of `slice` 238317455
310855678 https://github.com/pydata/xarray/issues/1465#issuecomment-310855678 https://api.github.com/repos/pydata/xarray/issues/1465 MDEyOklzc3VlQ29tbWVudDMxMDg1NTY3OA== jdossgollin 11929622 2017-06-24T18:18:17Z 2017-06-24T18:18:17Z NONE

Definitely a fair point, but would it be possible to add an argument to either slice or sel (probably slice) which defaults to False? For example, ds.sel(lon = slice(X0, X1, both_ways = True) would implement this behavior, but both_ways defaults to False.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More Robust Implementation of `slice` 238317455
310855401 https://github.com/pydata/xarray/issues/1465#issuecomment-310855401 https://api.github.com/repos/pydata/xarray/issues/1465 MDEyOklzc3VlQ29tbWVudDMxMDg1NTQwMQ== fmaussion 10050469 2017-06-24T18:15:16Z 2017-06-24T18:15:16Z MEMBER

While it seems a good idea at first (I've fallen into this as well), I'm not sure this would be a good idea. Look at pandas for example:

```python In [1]: import pandas as pd

In [2]: ts = pd.Series([1, 2, 3, 4,])

In [3]: ts[1:3] Out[3]: 1 2 2 3 dtype: int64

In [4]: ts[3:1] Out[4]: Series([], dtype: int64) ```

I don't think one would like the last statement to return something else than an empty series.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More Robust Implementation of `slice` 238317455

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