home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 651674763

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-651674763 https://api.github.com/repos/pydata/xarray/issues/4186 651674763 MDEyOklzc3VlQ29tbWVudDY1MTY3NDc2Mw== 15720911 2020-06-30T09:24:13Z 2020-06-30T09:24:13Z NONE

Hi @shoyer , without dataframe.set_index(), dataframe.index can potentially be different from idx returned by remove_unused_levels_categories, this will lead to other problems. One example is the following df: df = pd.DataFrame( { 'lev1': pd.Series( ['b', 'a'], dtype=pd.CategoricalDtype(['c', 'b', 'a'], ordered=True) ), 'lev2': 'foo', 'C1': [0, 2], 'C2': [1, 3], } ).set_index(['lev1', 'lev2'])

I agree it will be better if we can maintain the order from df to xr.Dataset, but I think we should never work with a copy of idx which is different from dataframe.index, as this will lead to hard to debug problems due to "surprising" behavior pandas does.

{
    "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.774ms · About: xarray-datasette