home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where user = 19226431 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, created_at (date), updated_at (date)

issue 4

  • Harmonize returned multi-indexed indexes when applying `concat` along new dimension 4
  • preserve chunked data when creating DataArray from itself 2
  • preserve chunked data when creating DataArray from DataArray 1
  • groupby(multi-index level) not working correctly on a multi-indexed DataArray or DataSet 1

user 1

  • FabianHofmann · 8 ✖

author_association 1

  • CONTRIBUTOR 8
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1254926860 https://github.com/pydata/xarray/issues/6836#issuecomment-1254926860 https://api.github.com/repos/pydata/xarray/issues/6836 IC_kwDOAMm_X85KzKoM FabianHofmann 19226431 2022-09-22T12:03:52Z 2022-09-22T12:03:52Z CONTRIBUTOR

After trying to dig down further into the code, I saw that grouping over levels seems to be broken generally (up-to-date main branch at time of writing), i.e.

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

midx = pd.MultiIndex.from_product([list("abc"), [0, 1]], names=("one", "two")) mda = xr.DataArray(np.random.rand(6, 3), [("x", midx), ("y", range(3))]) mda.groupby("one").sum() ```

raises: ```python

File ".../xarray/xarray/core/_reductions.py", line 5055, in sum return self.reduce(

File ".../xarray/xarray/core/groupby.py", line 1191, in reduce return self.map(reduce_array, shortcut=shortcut)

File ".../xarray/xarray/core/groupby.py", line 1095, in map return self._combine(applied, shortcut=shortcut)

File ".../xarray/xarray/core/groupby.py", line 1127, in _combine index, index_vars = create_default_index_implicit(coord)

File ".../xarray/xarray/core/indexes.py", line 974, in create_default_index_implicit index = PandasMultiIndex(array, name)

File ".../xarray/xarray/core/indexes.py", line 552, in init raise ValueError(

ValueError: conflicting multi-index level name 'one' with dimension 'one' ` in the functioncreate_default_index_implicit``. I am still a bit puzzled how to approach this. Any idea @benbovy?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby(multi-index level) not working correctly on a multi-indexed DataArray or DataSet 1318992926
1227319231 https://github.com/pydata/xarray/pull/6889#issuecomment-1227319231 https://api.github.com/repos/pydata/xarray/issues/6889 IC_kwDOAMm_X85JJ2e_ FabianHofmann 19226431 2022-08-25T14:12:55Z 2022-08-25T14:12:55Z CONTRIBUTOR

Great, thanks for the nice review @benbovy

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Harmonize returned multi-indexed indexes when applying `concat` along new dimension  1331855489
1226984544 https://github.com/pydata/xarray/pull/6889#issuecomment-1226984544 https://api.github.com/repos/pydata/xarray/issues/6889 IC_kwDOAMm_X85JIkxg FabianHofmann 19226431 2022-08-25T09:02:36Z 2022-08-25T09:02:36Z CONTRIBUTOR

@benbovy done :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Harmonize returned multi-indexed indexes when applying `concat` along new dimension  1331855489
1214867574 https://github.com/pydata/xarray/pull/6889#issuecomment-1214867574 https://api.github.com/repos/pydata/xarray/issues/6889 IC_kwDOAMm_X85IaWh2 FabianHofmann 19226431 2022-08-15T10:31:16Z 2022-08-15T10:31:16Z CONTRIBUTOR

@benbovy I applied your suggestion (+ a small fix) and merged with the up to date main branch. All tests pass.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Harmonize returned multi-indexed indexes when applying `concat` along new dimension  1331855489
1211751670 https://github.com/pydata/xarray/pull/6889#issuecomment-1211751670 https://api.github.com/repos/pydata/xarray/issues/6889 IC_kwDOAMm_X85IOdz2 FabianHofmann 19226431 2022-08-11T09:32:01Z 2022-08-11T09:32:01Z CONTRIBUTOR

Thanks @benbovy¸ glad that the proposed fix can help here!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Harmonize returned multi-indexed indexes when applying `concat` along new dimension  1331855489
1012384997 https://github.com/pydata/xarray/pull/5984#issuecomment-1012384997 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X848V8Tl FabianHofmann 19226431 2022-01-13T18:10:57Z 2022-01-13T18:10:57Z CONTRIBUTOR

It was a pleasure!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
969192355 https://github.com/pydata/xarray/issues/5983#issuecomment-969192355 https://api.github.com/repos/pydata/xarray/issues/5983 IC_kwDOAMm_X845xLOj FabianHofmann 19226431 2021-11-15T18:23:57Z 2021-11-15T18:23:57Z CONTRIBUTOR

Not sure, but I'd argue to keep the DataArray-from-self-construction as I imagine many convenience cases where arrays maybe DataArray, numpy arrays or dask arrays, and one wants to ensure a DataArray type. Many other packages like pandas/numpy have that. Also the xarray.Dataset supports from-self-construction.

Perhaps it is better to raise an error when ambiguities occur? Meaning don't allowing to pass attrs, coords when data is an DataArray...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from itself  1052736383
969086661 https://github.com/pydata/xarray/issues/5983#issuecomment-969086661 https://api.github.com/repos/pydata/xarray/issues/5983 IC_kwDOAMm_X845wxbF FabianHofmann 19226431 2021-11-15T16:31:11Z 2021-11-15T16:31:11Z CONTRIBUTOR

Ah yes, this is indeed ambiguous. On the other hand, as long it is still supported to create DataArray's from DataArray's they should at least preserve the data format. I need this as I am creating a subclass from the xarray.DataArray (see https://github.com/PyPSA/linopy/blob/8ac34d9fdbddc1fec0c7b4781f3d49e9c5ae064e/linopy/constraints.py#L18). In case I want to convert a lazy DataArray to my custom class the chunked data is directly computed, which seems a bit weird...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from itself  1052736383

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 13.749ms · About: xarray-datasette