home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1300527716

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/7245#issuecomment-1300527716 https://api.github.com/repos/pydata/xarray/issues/7245 1300527716 IC_kwDOAMm_X85NhHpk 90008 2022-11-02T14:27:04Z 2022-11-02T14:27:04Z CONTRIBUTOR

While the above "fix" addresses the issues with renaming coordinates, I think there are plenty of usecases where we would still end up with strange, or unexpected results. For example.

  1. Load a dataset with many non-indexing coordinates.
  2. Dropping variables (that happen to be coordinates).
  3. Then adding back a variable with the same name.
  4. Upon save, encoding would dictate that it is a coordinate of a particular variable and will promote it to a coordinate instead of data.

We could apply the "fix" to the drop_vars method as well, but I think it may be hard (though not impossible) to hit all the cases.

I think a more "generic", albeit breaking" fix would be to remove the "coordinates" entirely from encoding after the dataset has been loaded. That said, this only "works" if dataset['variable_name'].encoding['coordinates'] is considered a private variable. That is, users are not supposed to be adding to it at will.

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