home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 651458105

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-651458105 https://api.github.com/repos/pydata/xarray/issues/4186 651458105 MDEyOklzc3VlQ29tbWVudDY1MTQ1ODEwNQ== 1217238 2020-06-30T01:14:45Z 2020-06-30T01:14:45Z MEMBER

Actually, I realize now that this is basically the same issue as https://github.com/pydata/xarray/issues/2619

If I remove the use of removed_unused_levels_categories from from_dataframe, then I get the same behavior that we considered a bug in that issue: In [5]: ds.isel(xy=ds['x'] < 4).to_pandas().to_xarray() Out[5]: <xarray.DataArray (x: 8, y: 5)> array([[ 0., 1., 2., 3., 4.], [ 5., 6., 7., 8., 9.], [10., 11., 12., 13., 14.], [15., 16., 17., 18., 19.], [nan, nan, nan, nan, nan], [nan, nan, nan, nan, nan], [nan, nan, nan, nan, nan], [nan, nan, nan, nan, nan]]) Coordinates: * x (x) int64 0 1 2 3 4 5 6 7 * y (y) int64 0 1 2 3 4

So maybe it is more consistent to keep calling remove_unused_levels(), which somewhat surprisingly sorts MultiIndex levels.

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