home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "MEMBER", issue = 1175329407 and user = 5635139 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

user 1

  • max-sixty · 2 ✖

issue 1

  • Pass indexes to the Dataset and DataArray constructors · 2 ✖

author_association 1

  • MEMBER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1082497324 https://github.com/pydata/xarray/issues/6392#issuecomment-1082497324 https://api.github.com/repos/pydata/xarray/issues/6392 IC_kwDOAMm_X85AhZks max-sixty 5635139 2022-03-30T00:32:48Z 2022-03-30T00:32:48Z MEMBER

Thanks for the thoughtful reply @benbovy

(This is a level down and you can make a decision later, so fine if you prefer to push the discussion.)

How would we handle creating xarray objects from pandas objects where they have a multiindex?

To what extent do you think this is this the "standard case" and we could default to it?

python idx = xr.PandasMultiIndex(pd_idx, "x") indexes = {"x": idx, "foo": idx, "bar": idx}

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pass indexes to the Dataset and DataArray constructors 1175329407
1080007416 https://github.com/pydata/xarray/issues/6392#issuecomment-1080007416 https://api.github.com/repos/pydata/xarray/issues/6392 IC_kwDOAMm_X85AX5r4 max-sixty 5635139 2022-03-27T19:54:44Z 2022-03-27T19:54:44Z MEMBER

I realize there's a lot here and I've been out of this thread for a bit, so please forgive any naive questions!

I would suggest depreciating this behavior in favor of a more explicit (although more verbose) way to pass an existing pandas multi-index:

What's the rationale for deprecating this? I think my experience with users of xarray is mostly those coming from pandas; for them interop is quite important. If there's a canonical way of transforming the index, it would be friendlier to do that automatically.

```python import pandas as pd import xarray as xr

pd_idx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("foo", "bar")) idx = pd_idx

ds = xr.Dataset(coords={"x": idx}) ```

i.e.

``` ds = xr.Dataset(coords=coords)

ValueError: missing index(es) for coordinate(s): 'x', 'foo', 'bar'

or

create unindexed coordinates 'foo' and 'bar' and a 'x' coordinate with a single pandas index

```

I would have expected the later, both for coords=coords and for coords=pd_idx (again, with the disclaimer that I may be missing crucial parts of the puzzle here).

Should we silently reorder the coordinates and/or indexes when the levels are not passed in the right order? It seems odd requiring mapping elements be passed in a given order.

👍

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pass indexes to the Dataset and DataArray constructors 1175329407

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 4153.072ms · About: xarray-datasette