home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "MEMBER" and issue = 261727170 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

  • shoyer 4
  • jhamman 1
  • dcherian 1

issue 1

  • DataArray to_dict() without converting with numpy tolist() · 6 ✖

author_association 1

  • MEMBER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1504276696 https://github.com/pydata/xarray/issues/1599#issuecomment-1504276696 https://api.github.com/repos/pydata/xarray/issues/1599 IC_kwDOAMm_X85ZqXDY dcherian 2448579 2023-04-11T23:43:34Z 2023-04-11T23:43:43Z MEMBER

Perhaps we should have array_to_list: bool instead. If False, we just preserve the underlying array type.

Then the user could do ds.as_numpy().to_dict(array_to_list=False) to always get numpy arrays as #7739

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray to_dict() without converting with numpy tolist() 261727170
1500454096 https://github.com/pydata/xarray/issues/1599#issuecomment-1500454096 https://api.github.com/repos/pydata/xarray/issues/1599 IC_kwDOAMm_X85ZbxzQ jhamman 2443309 2023-04-07T16:47:09Z 2023-04-07T16:47:09Z MEMBER

@jmccreight - I don't think there is any specific reason this didn't get done. Still open to contributions here if you are interested.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray to_dict() without converting with numpy tolist() 261727170
333673706 https://github.com/pydata/xarray/issues/1599#issuecomment-333673706 https://api.github.com/repos/pydata/xarray/issues/1599 MDEyOklzc3VlQ29tbWVudDMzMzY3MzcwNg== shoyer 1217238 2017-10-02T21:42:10Z 2017-10-02T21:42:31Z MEMBER

@nicain myself, @jhamman and/or @MaximilianR are good choices for reviewers, thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray to_dict() without converting with numpy tolist() 261727170
333658466 https://github.com/pydata/xarray/issues/1599#issuecomment-333658466 https://api.github.com/repos/pydata/xarray/issues/1599 MDEyOklzc3VlQ29tbWVudDMzMzY1ODQ2Ng== shoyer 1217238 2017-10-02T20:41:05Z 2017-10-02T20:52:26Z MEMBER

We need to write a contributing guide!

But in brief: - We use the NumPy docstring convention: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt - For unit tests, we use pytest, with helper functions/methods for verifying comparisons between objects. Take a look at the existing tests for examples to emulate: https://github.com/pydata/xarray/blob/25d1855e737444c156f50d1f37a67d9674a8bac5/xarray/tests/test_dataset.py#L2402

See also: https://github.com/pydata/xarray/pull/1485/files

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray to_dict() without converting with numpy tolist() 261727170
333224773 https://github.com/pydata/xarray/issues/1599#issuecomment-333224773 https://api.github.com/repos/pydata/xarray/issues/1599 MDEyOklzc3VlQ29tbWVudDMzMzIyNDc3Mw== shoyer 1217238 2017-09-29T20:00:49Z 2017-09-29T20:00:49Z MEMBER

I'll let others chime in on the API design here but yes that sounds pretty reasonable, too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray to_dict() without converting with numpy tolist() 261727170
333209574 https://github.com/pydata/xarray/issues/1599#issuecomment-333209574 https://api.github.com/repos/pydata/xarray/issues/1599 MDEyOklzc3VlQ29tbWVudDMzMzIwOTU3NA== shoyer 1217238 2017-09-29T18:55:04Z 2017-09-29T18:55:04Z MEMBER

We could add a keyword argument to control this, e.g., numpy=True to indicate that data should be kept as NumPy arrays.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray to_dict() without converting with numpy tolist() 261727170

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