home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 179969119 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 3

  • byersiiasa 5
  • rabernat 4
  • shoyer 1

author_association 2

  • MEMBER 5
  • NONE 5

issue 1

  • groupby_bins: exclude bin or assign bin with nan when bin has no values · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
251238760 https://github.com/pydata/xarray/issues/1019#issuecomment-251238760 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MTIzODc2MA== byersiiasa 17701232 2016-10-03T21:54:22Z 2016-10-03T21:54:38Z NONE

@rabernat @shoyer thank you very much - (at least for my purposes) this appears to be working well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250773817 https://github.com/pydata/xarray/issues/1019#issuecomment-250773817 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDc3MzgxNw== byersiiasa 17701232 2016-09-30T15:24:31Z 2016-09-30T15:24:31Z NONE

Thanks @shoyer and @rabernat . @gidden and I may have a go next week. Otherwise if someone wants to jump in, I made a notebook to test/demonstrate the issue. groupby_bins_test_nb.zip

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250618039 https://github.com/pydata/xarray/issues/1019#issuecomment-250618039 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDYxODAzOQ== shoyer 1217238 2016-09-29T23:11:34Z 2016-09-29T23:11:34Z MEMBER

We actually already have some similar for ensuring that all resampled bins appear (see GroupBy._maybe_restore_empty_groups). If we set full_index = binned.categories in GroupBy.__init__ I think that should take care of it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250496630 https://github.com/pydata/xarray/issues/1019#issuecomment-250496630 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDQ5NjYzMA== byersiiasa 17701232 2016-09-29T15:15:44Z 2016-09-29T15:15:44Z NONE

0.8.2 updated from conda a few days ago. I'll try the master. Thanks

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250494742 https://github.com/pydata/xarray/issues/1019#issuecomment-250494742 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDQ5NDc0Mg== rabernat 1197350 2016-09-29T15:09:08Z 2016-09-29T15:09:12Z MEMBER

For now, can you just confirm what version of xarray you are using (xarray.__version__)?

I'm not sure if #952 has been released yet, but if you are using the latest master, that should at least fix the sorting issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250492101 https://github.com/pydata/xarray/issues/1019#issuecomment-250492101 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDQ5MjEwMQ== byersiiasa 17701232 2016-09-29T15:00:02Z 2016-09-29T15:00:02Z NONE

@rabernat I don't have much capability to help, but if any changes are made I am happy to help test this particular case.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250490528 https://github.com/pydata/xarray/issues/1019#issuecomment-250490528 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDQ5MDUyOA== rabernat 1197350 2016-09-29T14:55:05Z 2016-09-29T14:55:05Z MEMBER

As for the empty bins, I can see how this would be useful. I suppose it is a bug. Curious what @shoyer thinks about this case...

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250487659 https://github.com/pydata/xarray/issues/1019#issuecomment-250487659 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDQ4NzY1OQ== rabernat 1197350 2016-09-29T14:45:46Z 2016-09-29T14:45:46Z MEMBER

The sorting of bins should have been fixed in #952.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250486102 https://github.com/pydata/xarray/issues/1019#issuecomment-250486102 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDQ4NjEwMg== byersiiasa 17701232 2016-09-29T14:40:43Z 2016-09-29T14:40:43Z NONE

So if I plot the current output as a bar chart/histogram, that bin interval will be skipped. For example if I did: plt.plot(binns[0:-2], binned) #using left edges of the bins I would get an error if a bin present in binns has been skipped in binned.

I guess that perhaps there is a cleverer way of plotting the output data than this.

This leads to more important questions: 1. Do you know the logic to the ordering of the binned data and the bin objects? In this example, the bins input is monotonically increasing, but the bin object does not correspond. e.g.

binns = [-100, -50, 0, 50, 50.00001, 100] array(['(0, 50]', '(-50, 0]', '(51, 100]', '(-100, -50]'], dtype=object) 1. Does the order of output values in the summed array (binned) correspond to the input bins or the output bin object? If the latter, how do I reorder the data more in line with the monotonically increasing input bins array?

Thanks

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119
250464887 https://github.com/pydata/xarray/issues/1019#issuecomment-250464887 https://api.github.com/repos/pydata/xarray/issues/1019 MDEyOklzc3VlQ29tbWVudDI1MDQ2NDg4Nw== rabernat 1197350 2016-09-29T13:25:10Z 2016-09-29T13:25:10Z MEMBER

Just to understand better, what is the advantage to having this empty bin? How would you use that feature?

As is, the resulting Dataset can still be aligned with other bin objects that have different coordinates (i.e. non empty final bin).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby_bins: exclude bin or assign bin with nan when bin has no values 179969119

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