home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 171407924

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/702#issuecomment-171407924 https://api.github.com/repos/pydata/xarray/issues/702 171407924 MDEyOklzc3VlQ29tbWVudDE3MTQwNzkyNA== 1217238 2016-01-13T19:31:51Z 2016-01-13T19:31:51Z MEMBER

@jreback thanks for the comments!

I think the repr, though technically accurate, is a bit misleading. lists of tuples is really only useful as a MI, so why not actually indicate that

Agreed -- this is part of my "better repr" TODO.

stack/unstack (as in [9]) is not idempotent, as you are reconstituting the full cartesian product of levels. This seems a bit odd though (pandas can do this because its is separately tracking what is actually in the index, via the labels), I don't think you have this though?

This is true, and definitely worth noting as a compatibility break. But I do think we have a good reason for this: pandas's stack uses dropna (effectively) to drop unused levels, but this operation cannot be done lazily with dask.array. I am happy to force users to do a non-lazy dropna explicitly.

these ops are really analogs of set_index/reset_index, rather than stack/unstack, so might be a bit confusing (though I think I get why you are doing it this way), it makes more sense esp for multi-dim. Maybe explain this in the pandas guide?

I'm not quite sure what you mean here -- set_index/reset_index seem independent of these to me (though they would definitely also be worth adding!). The difference I see: - set_index: make 1d variables part of a (multi)-index along their existing axis - stack: combine orthogonal indexes (along different axes) into a multi-index

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