home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1359003371

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/7368#issuecomment-1359003371 https://api.github.com/repos/pydata/xarray/issues/7368 1359003371 IC_kwDOAMm_X85RAL7r 4160723 2022-12-20T08:34:06Z 2022-12-20T08:34:06Z MEMBER

I'm wondering if instead of Coordinates.from_pandas_multiindex() we might want to provide a more generic constructor available as an extension point? For example:

Coordinates.from_index(index_obj: Any, *, factory=None, **kwargs=None)

factory could be guessed from the type of index_obj. Xarray would support by default the pandas.MultiIndex and pandas.Index types. Like for IO backends, we could provide a CoordinatesFactoryEntrypoint so that it could support other index types.

One downside is that specific (mandatory?) options like dim for a pandas (multi-)index are not directly visible.

Would it be useful or is it overkill?

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