home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1345314909

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-1345314909 https://api.github.com/repos/pydata/xarray/issues/7368 1345314909 IC_kwDOAMm_X85QL-Bd 4160723 2022-12-10T16:59:44Z 2022-12-10T16:59:44Z MEMBER

Long term, do you think it would make sense to merge together Indexes, Coordinates and IndexedCoordinates? They are sort of all containers for the same thing.

Yes I think so.

I'm actually trying to merge IndexedCoordinates with Coordinates but I'm stuck: the latter is abstract and I don't really see how I could refactor it together with DatasetCoordinates and DataArrayCoordinates. Do you have any idea on how best to proceed?

Ideally, I'd see Coordinates be exposed in Xarray's main namespace with at least the two following constructors:

```python class Coordinates:

def __init__(
    self,
    coords: Mapping[Any, Any] | None = None,
    indexes: Mapping[Any, Index] | None = None,
):
    # Similar to Dataset.__init__ but without the need
    # to merge coords and data vars...
    # Probably ok to allow more flexibility / less safety here?
    ...

@classmethod
from_pandas_multiindex(cls, index: pd.MultiIndex, dim: str):
    ...

```

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