home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 442907394

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/1603#issuecomment-442907394 https://api.github.com/repos/pydata/xarray/issues/1603 442907394 MDEyOklzc3VlQ29tbWVudDQ0MjkwNzM5NA== 4160723 2018-11-29T16:49:12Z 2018-11-29T17:18:10Z MEMBER

ds.sel(multi=list_of_pairs) can probably be replaced by ds.sel(x=..., y=...), but how about reindex along MultiIndex?

Indeed I haven't really thought about reindex and alignment in my suggestion above.

How do you currently reindex along a multi-index dimension?

Contrary to .sel, ds.reindex(multi=list_of_pairs) doesn't seem to work (the list of n-length tuples being interpreted as a ~~n-dim~~ 2-d array). The only way I've found to make it work is to pass another pandas.MultiIndex. Wouldn't be it rather confusing if we choose to go with our own implementation of MultiIndex for xarray instead of pandas.MultiIndex?

Wouldn't be possible to easily support ds.reindex(x=..., y=...) within the new data model proposed here?

Am I right in thinking the Multi-indexes is only a helpful note to users, rather than conveying anything about how data is accessed?

This is a good question.

A related question: apart from ds.sel(multi=list_of_pairs) and ds.reindex(multi=list_of_pairs) use cases discussed so far, is there other reasons of having a variable for a multi-index?

I think we can do much of this before adding the ability to set custom indexes, which would be cool but further from where we are, I think.

I agree, although whether or not we will eventually support custom indexes might influence the design choices that we have to do now, IMO.

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