home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • shoyer 2
  • observingClouds 1

author_association 2

  • MEMBER 2
  • CONTRIBUTOR 1

issue 1

  • Resample with limit/tolerance · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
456666796 https://github.com/pydata/xarray/issues/2695#issuecomment-456666796 https://api.github.com/repos/pydata/xarray/issues/2695 MDEyOklzc3VlQ29tbWVudDQ1NjY2Njc5Ng== shoyer 1217238 2019-01-23T04:32:34Z 2019-01-23T04:32:34Z MEMBER

Tolerance sounds like a nice feature to add to me. You might consider adding it to pandas, too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Resample with limit/tolerance 401392318
456239824 https://github.com/pydata/xarray/issues/2695#issuecomment-456239824 https://api.github.com/repos/pydata/xarray/issues/2695 MDEyOklzc3VlQ29tbWVudDQ1NjIzOTgyNA== observingClouds 43613877 2019-01-22T01:25:55Z 2019-01-22T01:25:55Z CONTRIBUTOR

Thanks for the clarification! I think the tolerance argument might even be superior to the limit or to say the least, the resample methods would benefit from any of these arguments.

My above mentioned changes to the code, despite mixing up limit and tolerance, actually seem to implement the tolerance argument.

```python import xarray as xr import pandas as pd import datetime as dt

dates=[dt.datetime(2018,1,1), dt.datetime(2018,1,2)] data=[10,20] df=pd.DataFrame(data,index=dates) xdf = xr.Dataset.from_dataframe(df) xdf.resample({'index':'1H'}).nearest(tolerance=dt.timedelta(hours=2)) ``` would lead to

<xarray.Dataset> Dimensions: (index: 25) Coordinates: * index (index) datetime64[ns] 2018-01-01 ... 2018-01-02 Data variables: 0 (index) float64 10.0 10.0 10.0 nan nan ... nan nan 20.0 20.0 20.0

Would that be helpful to include and write a pull request?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Resample with limit/tolerance 401392318
456155618 https://github.com/pydata/xarray/issues/2695#issuecomment-456155618 https://api.github.com/repos/pydata/xarray/issues/2695 MDEyOklzc3VlQ29tbWVudDQ1NjE1NTYxOA== shoyer 1217238 2019-01-21T17:55:52Z 2019-01-21T17:55:52Z MEMBER

I think this would be a welcome feature, but I think there's an important difference between limit and tolerance in pandas that would make this a it more complicated to implement: - tolerance is specified in units matching the index. - limit is specified as an integer number of positions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Resample with limit/tolerance 401392318

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