issue_comments
3 rows where issue = 1175329407 and user = 4160723 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Pass indexes to the Dataset and DataArray constructors · 3 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
1290454937 | https://github.com/pydata/xarray/issues/6392#issuecomment-1290454937 | https://api.github.com/repos/pydata/xarray/issues/6392 | IC_kwDOAMm_X85M6seZ | benbovy 4160723 | 2022-10-25T12:19:52Z | 2022-10-25T12:19:52Z | MEMBER | I'm thinking of only accepting one or more instances of Indexes as
|
{ "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 | |
1260618693 | https://github.com/pydata/xarray/issues/6392#issuecomment-1260618693 | https://api.github.com/repos/pydata/xarray/issues/6392 | IC_kwDOAMm_X85LI4PF | benbovy 4160723 | 2022-09-28T09:13:00Z | 2022-09-28T12:52:01Z | MEMBER |
For For a ```python import pandas as pd import xarray as xr from xarray.indexes import PandasMultiIndex pd_idx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("foo", "bar")) idx = PandasMultiIndex(pd_idx, "x") indexes = {"x": idx, "foo": idx, "bar": idx} coords = idx.create_variables() ds = xr.Dataset(coords=coords, indexes=indexes) ``` For more convenience, we could add a class method to ```python this calls PandasMultiIndex.init() and PandasMultiIndex.create_variables() internallyindexes, coords = PandasMultiIndex.from_pandas_index(pd_idx, "x") ds = xr.Dataset(coords=coords, indexes=indexes) ``` Instead of ```python xmidx = PandasMultiIndex.from_pandas_index(pd_idx, "x") ds = xr.Dataset(coords=xmidx.variables, indexes=xmidx) ``` For even more convenience, I think it might be reasonable to support special handling of ```python both cases below will implicitly add the coordinates found in
|
{ "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 | |
1080738079 | https://github.com/pydata/xarray/issues/6392#issuecomment-1080738079 | https://api.github.com/repos/pydata/xarray/issues/6392 | IC_kwDOAMm_X85AasEf | benbovy 4160723 | 2022-03-28T14:38:13Z | 2022-03-28T14:38:13Z | MEMBER |
Yes I agree that interoperability with pandas is important. Providing pandas (multi-)indexes via Now that indexes are really distinct from coordinates, I'd rather expect the following behavior for the case of pandas multi-index: ```python pd_idx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("foo", "bar")) convert a pandas multi-index to a numpy array returns level values as tuplesnp.array(pd_idx) array([('a', 1), ('a', 2), ('b', 1), ('b', 2)], dtype=object)simply pass the index as a coordinate would treat it as an array-like, i.e., like numpy doesxr.Dataset(coords={"x": pd_idx}) <xarray.Dataset>Dimensions: (x: 4)Coordinates:* x (x) object ('a', 1) ('a', 2) ('b', 1) ('b', 2)Data variables:empty``` In this specific case, I'd favor consistency with how Numpy handles Pandas indexes over more convenient interoperability with Pandas. The array of tuple elements is not very useful, though. There should be ways to create Xarray objects with Pandas indexes, but I think it's better if we eventually pass them via More generally, I don't know how will evolve the ecosystem in the future (how many custom Xarray indexes?). I wonder to which point in Xarray's API we should support special cases for Pandas (multi-)indexes compared to other kinds of indexes. |
{ "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
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]);
user 1