home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 241389297 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

  • shoyer 2
  • delgadom 2

author_association 2

  • CONTRIBUTOR 2
  • MEMBER 2

issue 1

  • .sel(drop=True) fails to drop coordinate · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
314154076 https://github.com/pydata/xarray/issues/1472#issuecomment-314154076 https://api.github.com/repos/pydata/xarray/issues/1472 MDEyOklzc3VlQ29tbWVudDMxNDE1NDA3Ng== delgadom 3698640 2017-07-10T16:08:30Z 2017-07-10T16:08:30Z CONTRIBUTOR

I wasn't misled by the docs, just by my intuition. But now that you've made the distinction between '2012' and '2012-12-31' this totally makes sense:

```python In [24]: arr.sel(time='2012') Out[24]: <xarray.DataArray (time: 1, age: 4)> array([[ 0.244146, 0.702819, 0.06614 , 0.211758]]) Coordinates: * age (age) object 'age0' 'age1' 'age2' 'age3' * time (time) datetime64[ns] 2012-12-31

In [25]: arr.sel(time='2012-12-31') Out[25]: <xarray.DataArray (age: 4)> array([ 0.244146, 0.702819, 0.06614 , 0.211758]) Coordinates: * age (age) object 'age0' 'age1' 'age2' 'age3' time datetime64[ns] 2012-12-31

In [26]: arr.sel(time=np.datetime64('2012-12-31')) Out[26]: <xarray.DataArray (age: 4)> array([ 0.244146, 0.702819, 0.06614 , 0.211758]) Coordinates: * age (age) object 'age0' 'age1' 'age2' 'age3' time datetime64[ns] 2012-12-31 ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  .sel(drop=True) fails to drop coordinate 241389297
314149877 https://github.com/pydata/xarray/issues/1472#issuecomment-314149877 https://api.github.com/repos/pydata/xarray/issues/1472 MDEyOklzc3VlQ29tbWVudDMxNDE0OTg3Nw== shoyer 1217238 2017-07-10T15:54:22Z 2017-07-10T15:54:22Z MEMBER

If you can point to a place in docs where you were mislead, suggestions for clarification would be very welcome.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  .sel(drop=True) fails to drop coordinate 241389297
314136206 https://github.com/pydata/xarray/issues/1472#issuecomment-314136206 https://api.github.com/repos/pydata/xarray/issues/1472 MDEyOklzc3VlQ29tbWVudDMxNDEzNjIwNg== delgadom 3698640 2017-07-10T15:10:50Z 2017-07-10T15:10:50Z CONTRIBUTOR

thanks for the schooling. learned something new!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  .sel(drop=True) fails to drop coordinate 241389297
314007170 https://github.com/pydata/xarray/issues/1472#issuecomment-314007170 https://api.github.com/repos/pydata/xarray/issues/1472 MDEyOklzc3VlQ29tbWVudDMxNDAwNzE3MA== shoyer 1217238 2017-07-10T05:09:05Z 2017-07-10T05:09:05Z MEMBER

drop=True is actually intended to control dropping scalar coordinates, but the result of indexing with '2012' isn't producing a scalar. In this case, what you need is to squeeze out the length one dimension, with .squeeze().

The counter intuitive behavior you are seeing for indexing with a string for a year like arr.sel(time='2012') is something we inherit upstream from pandas: http://pandas.pydata.org/pandas-docs/stable/timeseries.html#slice-vs-exact-match

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  .sel(drop=True) fails to drop coordinate 241389297

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 719.943ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows