home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "CONTRIBUTOR" and issue = 657466413 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • ghislainp 1
  • PGijsbers 1

issue 1

  • to_dataframe: no valid index for a 0-dimensional object · 2 ✖

author_association 1

  • CONTRIBUTOR · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
715958475 https://github.com/pydata/xarray/issues/4228#issuecomment-715958475 https://api.github.com/repos/pydata/xarray/issues/4228 MDEyOklzc3VlQ29tbWVudDcxNTk1ODQ3NQ== PGijsbers 15890747 2020-10-24T16:04:36Z 2020-10-24T16:04:36Z CONTRIBUTOR

Hi, I tried to work on this issue. I made the changes on the fix_#4228 branch of my fork (all in this commit).

Unfortunately I can't currently reproduce the full test environment. I am running python through the standard release and not anaconda/miniconda, and I am hesitant to install it alongside my current setup because that has caused some issues in the past. Simply installing pytest in my environment did allow me to run some tests (4031 passed, 4237 skipped, 66 xfailed, 15 xpassed, 41 warnings). Most notably the edited test ran successfully (i.e. pass on fresh pull, fail after I updated the test, pass again after I updated code).

Please let me know if that's good enough to open a pull request and ask for a review.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_dataframe: no valid index for a 0-dimensional object 657466413
658912550 https://github.com/pydata/xarray/issues/4228#issuecomment-658912550 https://api.github.com/repos/pydata/xarray/issues/4228 MDEyOklzc3VlQ29tbWVudDY1ODkxMjU1MA== ghislainp 10563614 2020-07-15T17:54:57Z 2020-07-15T18:29:20Z CONTRIBUTOR

thanks for the very clear response. The behaviro make sense.

In fact, I should have explained what I'm trying to achieve, as this is kind of "take". I've a dict like this: python {'label1' : dict(coord1=1, coord2=4), 'label2' : dict(coord1=5, coord2=6), 'label3' : dict(coord1=4, coord2=2), } and I want to build an xarray (and then a dataframe) with coord1 and coord2 replaced by a new dims with values 'label1', 'label2', 'label3'.

I've done that by iterating over the dict, selecting with sel using the dict values, convert to dataframe and then concat the dataframes. pd.concat([x.sel(**d[k]).to_dataframe() or k in d]

A better option would be to do this "sel" or "take" with xarray only. Do you have an idea how to do it with existing xarray methods?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_dataframe: no valid index for a 0-dimensional object 657466413

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