home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 919836550

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/pull/5692#issuecomment-919836550 https://api.github.com/repos/pydata/xarray/issues/5692 919836550 IC_kwDOAMm_X84205eG 4160723 2021-09-15T09:04:02Z 2021-09-15T09:04:02Z MEMBER

Also from discussion with @shoyer:

It would make sense (in a follow-up PR) to depreciate the current set_index API (i.e., set new indexes per dimension) in favor of setting only one index with:

  • one or more variable names
  • optionally the index type (by default a pandas index or multi-index is created)
  • optionally one or more index build options to pass to the custom index (pandas indexes have no build option).

This departs from pandas.DataFrame.set_index API but it's more adapted to xarray's new data model with explicit indexes.

Currently Xarray also allows creating (multi-)indexes from existing (multi-)indexes, either with .set_index({...}, append=True), .reset_index(["not", "all", "levels"]) and .reorder_levels(). This API is specific to pandas (multi-)indexes so maybe it would make sense to depreciate it? One advantage over simply drop the index and re-create it from scratch is a possible gain in performance, which probably makes sense in pandas but we're not sure if it's worth the extra complexity here. Unless this kind incremental index build would be useful for other, custom indexes too?

(we should probably discuss this further in a new issue)

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