home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 347895055 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 2
  • Thomas-Z 1
  • stale[bot] 1

author_association 3

  • MEMBER 2
  • CONTRIBUTOR 1
  • NONE 1

issue 1

  • Dataset/DataArray to_dataframe() dimensions order mismatch. · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
671494921 https://github.com/pydata/xarray/issues/2346#issuecomment-671494921 https://api.github.com/repos/pydata/xarray/issues/2346 MDEyOklzc3VlQ29tbWVudDY3MTQ5NDkyMQ== shoyer 1217238 2020-08-10T17:45:43Z 2020-08-10T17:45:43Z MEMBER

I opened a new issue for explicitly setting dimension order: #4331

This would definitely be a welcome improvement!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset/DataArray to_dataframe() dimensions order mismatch. 347895055
655869344 https://github.com/pydata/xarray/issues/2346#issuecomment-655869344 https://api.github.com/repos/pydata/xarray/issues/2346 MDEyOklzc3VlQ29tbWVudDY1NTg2OTM0NA== stale[bot] 26384082 2020-07-09T03:04:46Z 2020-07-09T03:04:46Z 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
}
  Dataset/DataArray to_dataframe() dimensions order mismatch. 347895055
410963647 https://github.com/pydata/xarray/issues/2346#issuecomment-410963647 https://api.github.com/repos/pydata/xarray/issues/2346 MDEyOklzc3VlQ29tbWVudDQxMDk2MzY0Nw== Thomas-Z 1492047 2018-08-07T07:37:06Z 2018-08-07T07:37:06Z CONTRIBUTOR

I was kind of expecting to get the order shown when looking at the dims property but i understand your point and it makes sense.

Two things are still bothering me though: - ds['foo'].to_dataframe() and ds[['foo']].to_dataframe() might have different results - if we want to have a specific order we have to apply reorder_levels and sort_index which can be quite expensive.

For the first point I don't think anything should be done, it's a special case and even if it could be easily tested it might be ugly. For the second point I would not change anything to the way the order is defined now, it's consistent and easily predictable. Instead I would add an additional optional parameter to to_dataframe() (the one from _to_dataframe(ordered_dims)) to allow the user to get the order he wants.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset/DataArray to_dataframe() dimensions order mismatch. 347895055
410813979 https://github.com/pydata/xarray/issues/2346#issuecomment-410813979 https://api.github.com/repos/pydata/xarray/issues/2346 MDEyOklzc3VlQ29tbWVudDQxMDgxMzk3OQ== shoyer 1217238 2018-08-06T18:51:33Z 2018-08-06T18:51:33Z MEMBER

How would you suggest choosing the order of dimensions in Dataset.to_dataframe?

The current choice has the advantage that it matches self.dims and is invariant to the order in which variables were added into the dataset. As for the order of iteration for Dataset.dims, at one point early in xarray, I think we had dims as either a dict or OrderedDict, but for both of those the iteration order is somewhat arbitrary and can differ for two Dataset objects that otherwise look identical. At least SortedKeyDict is ocnsistent.

If we want to change this (which could be OK), I would try to change the iteration order of self.dims instead so it remains consistent. Potentially we could make Dataset.dims iterate over dimensions in order of their appearance on a variable, data variables first followed by coordinates. This would potentially entail the potential need to iterate over all variables to iterate over dimensions, but I think that would probably be acceptable.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset/DataArray to_dataframe() dimensions order mismatch. 347895055

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 24.82ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows