home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 925718593

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/pull/5692#issuecomment-925718593 https://api.github.com/repos/pydata/xarray/issues/5692 925718593 IC_kwDOAMm_X843LVhB 4160723 2021-09-23T11:16:18Z 2021-09-23T11:16:18Z MEMBER

In the last commits I refactored stack / unstack.

One change is that a multi-index is not always created with stack. It is created only if each of the dimensions to stack together have one and only one coordinate with a pandas index (this could be a non-dimension coordinate).

This could maybe address #5202, since we could simply drop the indexes before stacking the dimensions in order to avoid the creation of a multi-index. I don't think it's a big breaking change either unless there are users who rely on default multi-indexes with range (0, 1, 2...) levels. Looking at #5202, however, those default multi-indexes seem more problematic than something really useful, but I might be wrong here. Also, range-based indexes can still be created explicitly before stacking the dimensions if needed.

Another consequence is that stack is not always reversible, since unstack still requires a pandas multi-index (one and only one multi-index per dimension to unstack).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  966983801
Powered by Datasette · Queries took 0.865ms · About: xarray-datasette