home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1212214557

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/6836#issuecomment-1212214557 https://api.github.com/repos/pydata/xarray/issues/6836 1212214557 IC_kwDOAMm_X85IQO0d 2448579 2022-08-11T16:28:10Z 2022-08-11T16:36:35Z MEMBER

@benbovy I tracked this down to

``` python

mda.one.to_index()

v2022.06.0

MultiIndex([('a', 0), ('a', 1), ('b', 0), ('b', 1), ('c', 0), ('c', 1)], names=['one', 'two'])

v2022.03.0

Index(['a', 'a', 'b', 'b', 'c', 'c'], dtype='object', name='x') ```

We call to_index here in safe_cast_to_index: https://github.com/pydata/xarray/blob/f8fee902360f2330ab8c002d54480d357365c172/xarray/core/utils.py#L115-L140

Not sure if the fix should be only in the GroupBy specifically or more generally in safe_cast_to_index

The GroupBy context is https://github.com/pydata/xarray/blob/f8fee902360f2330ab8c002d54480d357365c172/xarray/core/groupby.py#L434

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