home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 124154674 and user = 1217238 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

user 1

  • shoyer · 5 ✖

issue 1

  • Keep attrs & Add a 'keep_coords' argument to Dataset.apply · 5 ✖

author_association 1

  • MEMBER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
304060814 https://github.com/pydata/xarray/issues/688#issuecomment-304060814 https://api.github.com/repos/pydata/xarray/issues/688 MDEyOklzc3VlQ29tbWVudDMwNDA2MDgxNA== shoyer 1217238 2017-05-25T16:49:17Z 2017-05-25T16:49:17Z MEMBER

@snowman2 can you print an example of what self.data looks like? And desired vs. actual output if you remove those lines to add in the coordinates manually?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep attrs & Add a 'keep_coords' argument to Dataset.apply 124154674
303900776 https://github.com/pydata/xarray/issues/688#issuecomment-303900776 https://api.github.com/repos/pydata/xarray/issues/688 MDEyOklzc3VlQ29tbWVudDMwMzkwMDc3Ng== shoyer 1217238 2017-05-25T01:54:51Z 2017-05-25T01:54:51Z MEMBER

@snowman2 I tried to reproduce your issue, but I couldn't make resample drop coordinates: ```python In [21]: ds = xarray.tutorial.load_dataset('rasm')

In [22]: ds.resample('AS', 'time', how=np.sum) Out[22]: <xarray.Dataset> Dimensions: (time: 4, x: 275, y: 205) Coordinates: yc (y, x) float64 16.53 16.78 17.02 17.27 17.51 17.76 18.0 18.25 ... xc (y, x) float64 189.2 189.4 189.6 189.7 189.9 190.1 190.2 190.4 ... * time (time) datetime64[ns] 1980-01-01 1981-01-01 1982-01-01 1983-01-01 Dimensions without coordinates: x, y Data variables: Tair (time, y, x) float64 nan nan nan nan nan nan nan nan nan nan ... ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep attrs & Add a 'keep_coords' argument to Dataset.apply 124154674
298206446 https://github.com/pydata/xarray/issues/688#issuecomment-298206446 https://api.github.com/repos/pydata/xarray/issues/688 MDEyOklzc3VlQ29tbWVudDI5ODIwNjQ0Ng== shoyer 1217238 2017-04-30T02:17:17Z 2017-04-30T02:17:17Z MEMBER

@snowman2 Can you give a concrete example of the sort of function you would want to apply?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep attrs & Add a 'keep_coords' argument to Dataset.apply 124154674
297475228 https://github.com/pydata/xarray/issues/688#issuecomment-297475228 https://api.github.com/repos/pydata/xarray/issues/688 MDEyOklzc3VlQ29tbWVudDI5NzQ3NTIyOA== shoyer 1217238 2017-04-26T16:58:18Z 2017-04-26T16:58:18Z MEMBER

@snowman2 Possibly yes, though we would want to think through the use-cases for this first. Arguably, you should explicitly preserve coordinates in your custom callable instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep attrs & Add a 'keep_coords' argument to Dataset.apply 124154674
167832185 https://github.com/pydata/xarray/issues/688#issuecomment-167832185 https://api.github.com/repos/pydata/xarray/issues/688 MDEyOklzc3VlQ29tbWVudDE2NzgzMjE4NQ== shoyer 1217238 2015-12-29T17:08:57Z 2015-12-29T17:08:57Z MEMBER

I would be fine with a keep_coords argument.

I'm wary of always keeping coordinates, because some applied operations could make existing coordinates no longer valid. For example, suppose you want to use pandas's faster time-resampling, i.e., ds.apply(lambda x: x.to_pandas().resample('24H')). Any coordinates along the time would no longer be valid. We could automatically align the coordinates, but that starts to get increasingly magical...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep attrs & Add a 'keep_coords' argument to Dataset.apply 124154674

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