home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 651905098

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/4186#issuecomment-651905098 https://api.github.com/repos/pydata/xarray/issues/4186 651905098 MDEyOklzc3VlQ29tbWVudDY1MTkwNTA5OA== 1217238 2020-06-30T16:29:10Z 2020-06-30T16:44:02Z MEMBER

@Li9htmare I'm not sure I follow your example. #4184 does remove the use of DataFrame.set_index(), but it also removes any subsequent use of dataframe.index -- it always uses the separately processed index.

Is there something specific that you are worried about going wrong with your latest example? For what it's worth, here's what to_xarray() does with the current version of #4184: ``` In [4]: df.to_xarray() Out[4]: <xarray.Dataset> Dimensions: (lev1: 2, lev2: 1) Coordinates: * lev1 (lev1) object 'b' 'a' * lev2 (lev2) object 'foo' Data variables: C1 (lev1, lev2) int64 0 2 C2 (lev1, lev2) int64 1 3

In [5]: df.to_xarray().indexes Out[5]: lev1: CategoricalIndex(['b', 'a'], categories=['b', 'a'], ordered=True, name='lev1', dtype='category') lev2: Index(['foo'], dtype='object', name='lev2') ```

I think this is doing the right thing already?

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