home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER", issue = 308030789 and user = 6815844 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • fujiisoup · 4 ✖

issue 1

  • rolling.mean vs rolling.construct.mean · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
376342444 https://github.com/pydata/xarray/issues/2010#issuecomment-376342444 https://api.github.com/repos/pydata/xarray/issues/2010 MDEyOklzc3VlQ29tbWVudDM3NjM0MjQ0NA== fujiisoup 6815844 2018-03-26T23:16:57Z 2018-03-26T23:16:57Z MEMBER

I think that masking the construct-ed array would make the full copy of this, while originally construct returns a view of the original array. Another option would be to support an additional method (get_mask?), but as this can be realized quite easily (rolling.count() > rolling.min_periods) I am not sure how worth it is.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  rolling.mean vs rolling.construct.mean 308030789
375684859 https://github.com/pydata/xarray/issues/2010#issuecomment-375684859 https://api.github.com/repos/pydata/xarray/issues/2010 MDEyOklzc3VlQ29tbWVudDM3NTY4NDg1OQ== fujiisoup 6815844 2018-03-23T14:34:53Z 2018-03-23T14:34:53Z MEMBER

Ok, so ds.rolling.mean allows for min_periods while ds.rolling.construct.mean allows for fill_value?

Yes. Originally, construct method is designed for more advanced use cases, such as strided moving average, weighted mean, short time FFT, etc.

On the other hand, using skipna=False resores the default behaviour or ds.rolling

It is not strictly true. min_periods also considers nan values that already exist in the original array. This behavior is the same with pandas rolling.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  rolling.mean vs rolling.construct.mean 308030789
375678008 https://github.com/pydata/xarray/issues/2010#issuecomment-375678008 https://api.github.com/repos/pydata/xarray/issues/2010 MDEyOklzc3VlQ29tbWVudDM3NTY3ODAwOA== fujiisoup 6815844 2018-03-23T14:13:04Z 2018-03-23T14:13:04Z MEMBER

I think we need to document more clearly that min_periods option is just neglected if using construct method.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  rolling.mean vs rolling.construct.mean 308030789
375676323 https://github.com/pydata/xarray/issues/2010#issuecomment-375676323 https://api.github.com/repos/pydata/xarray/issues/2010 MDEyOklzc3VlQ29tbWVudDM3NTY3NjMyMw== fujiisoup 6815844 2018-03-23T14:07:42Z 2018-03-23T14:07:42Z MEMBER

Hi, @mathause. Thanks for reporting.

I agree that this behavior is a little surprising, but this is something expected. The difference is not skipna=True (both use this), but actually in min_periods. If you specify min_periods=1, then the results become identical. python In [7]: ds.rolling(dim=3, center=True, min_periods=1).mean() Out[7]: <xarray.DataArray (dim: 4)> array([0.5, 1. , 2. , 2.5]) Dimensions without coordinates: dim

I am not sure how we can make both the behaviors the same with keeping the generality of construct method.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  rolling.mean vs rolling.construct.mean 308030789

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