home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 201330301

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/719#issuecomment-201330301 https://api.github.com/repos/pydata/xarray/issues/719 201330301 MDEyOklzc3VlQ29tbWVudDIwMTMzMDMwMQ== 4160723 2016-03-25T15:19:45Z 2016-03-25T15:19:45Z MEMBER

Thinking about serialization, a possible solution would be splitting the multi-index into separate coordinates for the same dimension, then assign some specific attributes (e.g., xarray_idx_name, xarray_idx_level) to each of these coordinates so that it is possible to further rebuild the multi-index.

More generally, a couple of methods acting on coordinates only can be a complement to stack/unstack methods (acting on both coordinates and dimensions). Merge/split xarray coordinates into/from a multi-index seem very straightforward to implement.

Similarly, a better repr would represent levels as sub-coordinates:

<xarray.DataArray (dim_0: 3)> array([0, 1, 2]) Coordinates: * dim_0 (dim_0) object level_0 (0) object 'foo' 'foo' 'bar' level_1 (1) int64 0 1 2

Any thoughts on this (I can start PRs)?

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