home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 369639339 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • huard 1
  • spencerkclark 1
  • stale[bot] 1

author_association 3

  • CONTRIBUTOR 1
  • MEMBER 1
  • NONE 1

issue 1

  • Implement CFPeriodIndex · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
699599921 https://github.com/pydata/xarray/issues/2481#issuecomment-699599921 https://api.github.com/repos/pydata/xarray/issues/2481 MDEyOklzc3VlQ29tbWVudDY5OTU5OTkyMQ== stale[bot] 26384082 2020-09-27T07:50:54Z 2020-09-27T07:50:54Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement CFPeriodIndex 369639339
429856032 https://github.com/pydata/xarray/issues/2481#issuecomment-429856032 https://api.github.com/repos/pydata/xarray/issues/2481 MDEyOklzc3VlQ29tbWVudDQyOTg1NjAzMg== huard 81219 2018-10-15T13:39:25Z 2018-10-15T13:39:25Z CONTRIBUTOR

Got it, thanks for the workaround !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement CFPeriodIndex 369639339
429497014 https://github.com/pydata/xarray/issues/2481#issuecomment-429497014 https://api.github.com/repos/pydata/xarray/issues/2481 MDEyOklzc3VlQ29tbWVudDQyOTQ5NzAxNA== spencerkclark 6628425 2018-10-13T00:42:35Z 2018-10-13T00:42:35Z MEMBER

I think this would be a fair amount of work to implement :), but in principle it would be a natural step forward in the pattern we have been following in porting time series functionality from pandas for use with calendars supported by cftime.

In the short term, at least for the use-case you describe above, I think a potentially simpler option would be to use a call to CFTimeIndex.shift; based on your example I'll illustrate with the DatetimeIndex version, since resample doesn't exist yet for a CFTimeIndex: ``` In [1]: import xarray as xr; import pandas as pd

In [2]: times = pd.date_range('2000', periods=361)

In [3]: da = xr.DataArray(range(361), [('time', times)])

In [4]: monthly_count = da.resample(time='M').count()

In [5]: end_time = monthly_count.indexes['time']

In [6]: start_time = end_time.shift(-1, 'M')

In [7]: expected_days_in_group = end_time - start_time

In [8]: expected_days_in_group Out[8]: TimedeltaIndex(['31 days', '29 days', '31 days', '30 days', '31 days', '30 days', '31 days', '31 days', '30 days', '31 days', '30 days', '31 days'], dtype='timedelta64[ns]', name=u'time', freq=None) Note that currently subtracting one CFTimeIndex from another (analogous to `end_time - start_time` in the example above) raises an error (I think it should also return a TimedeltaIndex), but that's probably a straightforward fix (I'll create a separate issue): In [8]: a = xr.cftime_range('2000', periods=12, freq='M')

In [9]: b = a.shift(-1, 'M')

In [10]: a - b

TypeError Traceback (most recent call last) <ipython-input-10-09bd029d0285> in <module>() ----> 1 a - b

/Users/spencerclark/xarray-dev/xarray/xarray/coding/cftimeindex.pyc in sub(self, other) 365 366 def sub(self, other): --> 367 return CFTimeIndex(np.array(self) - other) 368 369

TypeError: unsupported operand type(s) for -: 'numpy.ndarray' and 'CFTimeIndex' ```


As a side note, support even for standard PeriodIndexes in xarray needs some work -- see the following existing open issues: #1270, #1565. Serialization to netCDF files would also be nice to support (but I don't see an existing issue for that). I'm sure work to fix these issues would also be appreciated!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement CFPeriodIndex 369639339

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