home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 410813979

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/2346#issuecomment-410813979 https://api.github.com/repos/pydata/xarray/issues/2346 410813979 MDEyOklzc3VlQ29tbWVudDQxMDgxMzk3OQ== 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
}
  347895055
Powered by Datasette · Queries took 79.493ms · About: xarray-datasette