home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • shoyer 1
  • max-sixty 1
  • mathause 1

issue 1

  • Add to_pandas method for Dataset · 3 ✖

author_association 1

  • MEMBER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
831962034 https://github.com/pydata/xarray/pull/5247#issuecomment-831962034 https://api.github.com/repos/pydata/xarray/issues/5247 MDEyOklzc3VlQ29tbWVudDgzMTk2MjAzNA== mathause 10194086 2021-05-04T13:56:17Z 2021-05-04T13:56:17Z MEMBER

Thanks @gcaria!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add to_pandas method for Dataset 874044225
830925003 https://github.com/pydata/xarray/pull/5247#issuecomment-830925003 https://api.github.com/repos/pydata/xarray/issues/5247 MDEyOklzc3VlQ29tbWVudDgzMDkyNTAwMw== shoyer 1217238 2021-05-02T23:23:52Z 2021-05-02T23:23:52Z MEMBER

The model we have with DataArray.to_pandas() is that it converts into a corresponding pandas object without changing the number of dimensions. to_dataframe()/to_series() will flatten multiple dimensions into a MultiIndex, but that isn't the role of to_pandas().

Thus:

  • 0D xarray.DataArray -> 0D NumPy scalar
  • 1D xarray.DataArray -> 1D pandas.Series
  • 2D xarray.DataArray -> 2D pandas.DataFrame
  • 3D or higher xarray.DataArray -> error

If we treat a Dataset like a DataArray with one extra dimension (corresponding to variables), then it would make sense to have:

  • 0D xarray.Dataset -> 1D pandas.Series
  • 1D xarray.Dataset -> 2D pandas.DataFrame (same as to_dataframe())
  • 2D or higher xarray.Dataset -> error

I guess this is basically what you have here, except for raising an error in the final case (the error message should mention to_dataframe().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add to_pandas method for Dataset 874044225
830876382 https://github.com/pydata/xarray/pull/5247#issuecomment-830876382 https://api.github.com/repos/pydata/xarray/issues/5247 MDEyOklzc3VlQ29tbWVudDgzMDg3NjM4Mg== max-sixty 5635139 2021-05-02T21:39:43Z 2021-05-02T21:39:43Z MEMBER

Seems very reasonable to me; others' thoughts?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add to_pandas method for Dataset 874044225

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