home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 519875542

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/3054#issuecomment-519875542 https://api.github.com/repos/pydata/xarray/issues/3054 519875542 MDEyOklzc3VlQ29tbWVudDUxOTg3NTU0Mg== 6213168 2019-08-09T10:53:59Z 2019-08-09T10:58:00Z MEMBER

Indeed this is extremely inefficient. I'm afraid it's a -1 from me.

You can get the same with a much faster one-liner: a.stack(__flat=a.dims).reset_index('__flat') (although admittedly it's more RAM-intensive). On related notes, - stack() could use a set_index=True optional parameter that avoids you from going through a MultiIndex if you don't need one - stack() should accept non-string hashables; this would allow avoiding potential collisions (e.g. flat = object()) - there is an issue with the stack -> reset_index round-trip where it converts unicode variables to object #907

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