home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • jreback 2
  • shoyer 1
  • max-sixty 1

issue 1

  • BUG: Dataset.from_dataframe() losing dims? · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
168565401 https://github.com/pydata/xarray/issues/699#issuecomment-168565401 https://api.github.com/repos/pydata/xarray/issues/699 MDEyOklzc3VlQ29tbWVudDE2ODU2NTQwMQ== jreback 953992 2016-01-04T02:05:33Z 2016-01-04T02:05:33Z MEMBER

ok, closing.

also FYI, these seem reasonable as a default.

``` In [9]: p = tm.makePanel()

In [10]: p Out[10]: <class 'pandas.core.panel.Panel'> Dimensions: 3 (items) x 30 (major_axis) x 4 (minor_axis) Items axis: ItemA to ItemC Major_axis axis: 2000-01-03 00:00:00 to 2000-02-11 00:00:00 Minor_axis axis: A to D

In [11]: p.to_xray() Out[11]: <xray.Dataset> Dimensions: (items: 3, major_axis: 30, minor_axis: 4) Coordinates: * items (items) object 'ItemA' 'ItemB' 'ItemC' * major_axis (major_axis) datetime64[ns] 2000-01-03 2000-01-04 2000-01-05 ... * minor_axis (minor_axis) object 'A' 'B' 'C' 'D' Data variables: None (items, major_axis, minor_axis) float64 -0.5374 0.5918 ...

In [12]: p = tm.makePanel4D()

In [13]: p Out[13]: <class 'pandas.core.panelnd.Panel4D'> Dimensions: 3 (labels) x 3 (items) x 30 (major_axis) x 4 (minor_axis) Labels axis: l1 to l3 Items axis: ItemA to ItemC Major_axis axis: 2000-01-03 00:00:00 to 2000-02-11 00:00:00 Minor_axis axis: A to D

In [14]: p.to_xray() Out[14]: <xray.Dataset> Dimensions: (items: 3, labels: 3, major_axis: 30, minor_axis: 4) Coordinates: * labels (labels) object 'l1' 'l2' 'l3' * items (items) object 'ItemA' 'ItemB' 'ItemC' * major_axis (major_axis) datetime64[ns] 2000-01-03 2000-01-04 2000-01-05 ... * minor_axis (minor_axis) object 'A' 'B' 'C' 'D' Data variables: None (labels, items, major_axis, minor_axis) float64 -0.5523 ... ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG: Dataset.from_dataframe() losing dims? 124664101
168563184 https://github.com/pydata/xarray/issues/699#issuecomment-168563184 https://api.github.com/repos/pydata/xarray/issues/699 MDEyOklzc3VlQ29tbWVudDE2ODU2MzE4NA== jreback 953992 2016-01-04T01:33:31Z 2016-01-04T01:33:31Z MEMBER

ahh I c, so this is actually a 1-dim (len of 3), ok.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG: Dataset.from_dataframe() losing dims? 124664101
168563021 https://github.com/pydata/xarray/issues/699#issuecomment-168563021 https://api.github.com/repos/pydata/xarray/issues/699 MDEyOklzc3VlQ29tbWVudDE2ODU2MzAyMQ== shoyer 1217238 2016-01-04T01:30:35Z 2016-01-04T01:30:35Z MEMBER

In [24], the result has one dimension, foo, which has length 3. We do lose bar, but that's just the name of the columns. There simply isn't any logical place for that metadata on an xray Dataset.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG: Dataset.from_dataframe() losing dims? 124664101
168549489 https://github.com/pydata/xarray/issues/699#issuecomment-168549489 https://api.github.com/repos/pydata/xarray/issues/699 MDEyOklzc3VlQ29tbWVudDE2ODU0OTQ4OQ== max-sixty 5635139 2016-01-03T22:53:17Z 2016-01-03T22:53:17Z MEMBER

When converted to a Dataset each of the DataFrame's series becomes a DataArray, and is aligned on the only dim, in this case, 'foo'. We do lose the name of the columns (but that's all - do you think we're losing more than than?)

@shoyer will have a better view as to whether to_xray() should return a DataArray or Dataset. I think a Dataset would be cleaner, although we're going to have to glom together types anyway if it's a Panel, and users may be expecting an array-like object.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG: Dataset.from_dataframe() losing dims? 124664101

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