home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • dcherian 2
  • miniufo 2

author_association 2

  • MEMBER 2
  • NONE 2

issue 1

  • missing empty group when iterate over groupby_bins · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
621317315 https://github.com/pydata/xarray/issues/4011#issuecomment-621317315 https://api.github.com/repos/pydata/xarray/issues/4011 MDEyOklzc3VlQ29tbWVudDYyMTMxNzMxNQ== miniufo 9312831 2020-04-29T16:20:54Z 2020-04-29T16:20:54Z NONE

Thanks @dcherian. I use the get_group function and solve my problem. But a warning arises at the line if name not in self.groups: as: DeprecationWarning: elementwise comparison failed; this will raise an error in the future.

When the group contains nothing, I may assign nan or 0 to the corresponding bin. If it is dropped silently, then I need to find out which bin is missing its group. I like this PR #1027 by Ryan with a kwarg drop_empty_bins but not sure this option is eventually merged into master or not.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  missing empty group when iterate over groupby_bins 607718350
620592272 https://github.com/pydata/xarray/issues/4011#issuecomment-620592272 https://api.github.com/repos/pydata/xarray/issues/4011 MDEyOklzc3VlQ29tbWVudDYyMDU5MjI3Mg== dcherian 2448579 2020-04-28T13:02:32Z 2020-04-28T13:02:32Z MEMBER

Since you know the bins (which are generated with pd.cut), you could use the get_group function in this PR: https://github.com/pydata/xarray/pull/3691/files and catch the KeyError that would be raised.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  missing empty group when iterate over groupby_bins 607718350
620590686 https://github.com/pydata/xarray/issues/4011#issuecomment-620590686 https://api.github.com/repos/pydata/xarray/issues/4011 MDEyOklzc3VlQ29tbWVudDYyMDU5MDY4Ng== dcherian 2448579 2020-04-28T12:59:36Z 2020-04-28T12:59:36Z MEMBER

But if there's nothing matching a particular bin, then you have nothing to index the other array?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  missing empty group when iterate over groupby_bins 607718350
620581409 https://github.com/pydata/xarray/issues/4011#issuecomment-620581409 https://api.github.com/repos/pydata/xarray/issues/4011 MDEyOklzc3VlQ29tbWVudDYyMDU4MTQwOQ== miniufo 9312831 2020-04-28T12:41:43Z 2020-04-28T12:41:43Z NONE

When I use counts = grouped.count(), I can get all the bins and counts in the correct order, and the empty bin just returns nan. But I don't want aggregation operations here. I need the samples in each group to index another array. Maybe this is not the best solution. But my case do need all the groups in the same order as the given bins, including possible empty ones.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  missing empty group when iterate over groupby_bins 607718350

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