home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where user = 9399446 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 2

  • Ability to rename items inside a coordinate, matching pandas rename() functionality 2
  • [FEATURE]: Add a replace method 2

user 1

  • Jeitan · 4 ✖

author_association 1

  • NONE 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1085245244 https://github.com/pydata/xarray/issues/6377#issuecomment-1085245244 https://api.github.com/repos/pydata/xarray/issues/6377 IC_kwDOAMm_X85Ar4c8 Jeitan 9399446 2022-03-31T23:57:35Z 2022-03-31T23:57:35Z NONE

@Huite Indeed, you are right that working with a coordinate is easy if it works for DataArrays ... this is a good example of my pandas-oriented brain not quite being used to xarray just yet (though I do love it).

Regarding signature options for a Dataset ... given the two examples you state, I also personally prefer the look of the second one. However, the first one can be extremely useful for more complicated replacement needs because the input dict can be assembled programmatically prior to the replace call, for doing replaces in several subset DataArrays. I think the second version would require looping of some sort, or multiple calls at the very least. For me, in my context of renaming on coordinates (the index or columns in a DataFrame context), I often have to modify many things in both axes, which I do using one dictionary.

I suppose it's a matter of preference and of ease of implementation ... since I'm not the one doing the coding, I shall definitely defer to others on the latter point!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  [FEATURE]: Add a replace method 1173497454
1083385035 https://github.com/pydata/xarray/issues/6377#issuecomment-1083385035 https://api.github.com/repos/pydata/xarray/issues/6377 IC_kwDOAMm_X85AkyTL Jeitan 9399446 2022-03-30T16:54:18Z 2022-03-30T16:54:18Z NONE

Thanks @dcherian for linking the other issue because that led me here. I'm all for this! Though I would like to add the consideration for doing this replacement in a coordinate, not just the data (parts of the suggested code like returning da.copy(data=out.reshape(da.shape)) won't work for that). Once they are accessed coordinates work very much like the data part, so hopefully making this general shouldn't be too hard?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  [FEATURE]: Add a replace method 1173497454
804297243 https://github.com/pydata/xarray/issues/5048#issuecomment-804297243 https://api.github.com/repos/pydata/xarray/issues/5048 MDEyOklzc3VlQ29tbWVudDgwNDI5NzI0Mw== Jeitan 9399446 2021-03-22T18:32:55Z 2021-03-22T18:32:55Z NONE

@andersy005 's method definitely works, and I can iterate to do it for multiple names, so I've already gone away happy. A dedicated method would be nice though :).

"rename" is understandably overloaded ... would something like "update_coords" be workable? It sort of matches the existing "assign_coords".

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Ability to rename items inside a coordinate, matching pandas rename() functionality 834273555
801530191 https://github.com/pydata/xarray/issues/5048#issuecomment-801530191 https://api.github.com/repos/pydata/xarray/issues/5048 MDEyOklzc3VlQ29tbWVudDgwMTUzMDE5MQ== Jeitan 9399446 2021-03-18T00:35:13Z 2021-03-18T00:50:12Z NONE

I have not ... that does work! Do you have a nice way to do that for a whole set? I only used one here, but I'm typically renaming something like 5-8 at a time, so "rdict" would be much bigger.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Ability to rename items inside a coordinate, matching pandas rename() functionality 834273555

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