home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 522884917 and user = 10194086 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 1

  • mathause · 5 ✖

issue 1

  • ensure rename does not change index type · 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
554387834 https://github.com/pydata/xarray/pull/3532#issuecomment-554387834 https://api.github.com/repos/pydata/xarray/issues/3532 MDEyOklzc3VlQ29tbWVudDU1NDM4NzgzNA== mathause 10194086 2019-11-15T14:49:26Z 2019-11-15T14:49:26Z MEMBER

Fine for me. I think MultiIndex could be treated the same. However, it does conserve CFTimeIndex already, and the test would require a bit of thinking, so let's leave that for now.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ensure rename does not change index type 522884917
554374464 https://github.com/pydata/xarray/pull/3532#issuecomment-554374464 https://api.github.com/repos/pydata/xarray/issues/3532 MDEyOklzc3VlQ29tbWVudDU1NDM3NDQ2NA== mathause 10194086 2019-11-15T14:14:33Z 2019-11-15T14:14:33Z MEMBER

Thanks, yes my approach was indeed wrong. I updated the code and the tests. I was confused for a while because orig.rename_dims(time="time_new") drops indexes while orig.rename_dims() does not.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ensure rename does not change index type 522884917
553961331 https://github.com/pydata/xarray/pull/3532#issuecomment-553961331 https://api.github.com/repos/pydata/xarray/issues/3532 MDEyOklzc3VlQ29tbWVudDU1Mzk2MTMzMQ== mathause 10194086 2019-11-14T16:17:13Z 2019-11-14T16:17:13Z MEMBER

No, this probably does not work if only one of the names of a MultiIndex changes...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ensure rename does not change index type 522884917
553958685 https://github.com/pydata/xarray/pull/3532#issuecomment-553958685 https://api.github.com/repos/pydata/xarray/issues/3532 MDEyOklzc3VlQ29tbWVudDU1Mzk1ODY4NQ== mathause 10194086 2019-11-14T16:11:28Z 2019-11-14T16:12:47Z MEMBER

I think the current code will mutate the existing index name, is that correct?

Currently the index is recreated with the same name (even if it does not change it's name). We could change the following lines

https://github.com/pydata/xarray/blob/40588dc38ddc2d573e3dc8c63b2e6533eb978656/xarray/core/dataset.py#L2649-L2651

python new_name = name_dict.get(k, None) if new_name is None or new_name not in dims_set: continue to skip doing this (not sure if there is an edge cas I am missing here).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ensure rename does not change index type 522884917
553955961 https://github.com/pydata/xarray/pull/3532#issuecomment-553955961 https://api.github.com/repos/pydata/xarray/issues/3532 MDEyOklzc3VlQ29tbWVudDU1Mzk1NTk2MQ== mathause 10194086 2019-11-14T16:05:59Z 2019-11-14T16:05:59Z MEMBER

FWIW I think we can replace https://github.com/pydata/xarray/pull/3532/files#diff-921db548d18a549f6381818ed08298c9R2662-R2667 also with .rename, but it's minor and doesn't need to be in this PR

I have to look how this is done in the MultiIndex.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ensure rename does not change index type 522884917

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