home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 159768214

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
159768214 MDExOlB1bGxSZXF1ZXN0NzM0NjU0MTA= 879 Multi-index repr 4160723 closed 0     2 2016-06-11T10:58:13Z 2016-08-31T21:40:59Z 2016-08-31T21:40:59Z MEMBER   0 pydata/xarray/pulls/879

Another item of #719.

An example:

``` python

index = pd.MultiIndex.from_product((list('ab'), range(10))) index.names= ('a_long_level_name', 'level_1') data = xr.DataArray(range(20), [('x', index)]) data <xarray.DataArray (x: 20)> array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) Coordinates: * x (x) object MultiIndex - a_long_level_name object 'a' 'a' 'a' 'a' 'a' 'a' 'a' 'a' 'a' 'a' 'b' ... - level_1 int64 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 ```

To be consistent with the displayed coordinates and/or data variables, it displays the actual used level values. Using the pandas.MultiIndex.get_level_values method would be expensive for big indexes, so I re-implemented it in xarray so that we can truncate the computation to the first x values, which is very cheap.

It still needs testing.

Maybe it would be nice to align the level values.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/879/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.462ms · About: xarray-datasette