home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

2 rows where state = "closed" and user = 14136435 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • issue 1
  • pull 1

state 1

  • closed · 2 ✖

repo 1

  • xarray 2
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
544371732 MDExOlB1bGxSZXF1ZXN0MzU4NDk4NTg2 3658 add multiindex level name checking to .rename() hazbottles 14136435 closed 0     2 2020-01-01T15:51:54Z 2020-01-03T12:17:18Z 2020-01-03T12:16:45Z CONTRIBUTOR   0 pydata/xarray/pulls/3658
  • [X] Closes #3657
  • [X] Tests added
  • [X] Passes black . && mypy . && flake8
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3658/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
544371612 MDU6SXNzdWU1NDQzNzE2MTI= 3657 .rename() does not check conflict with multiindex level names hazbottles 14136435 closed 0     0 2020-01-01T15:50:38Z 2020-01-03T12:16:45Z 2020-01-03T12:16:45Z CONTRIBUTOR      

MCVE Code Sample

```python

import xarray as xr ds = xr.Dataset({"x": 42}, {"level0": [0, 1], "level1": [3, 4]}).set_index(mindex=["level0", "level1"]) ds <xarray.Dataset> Dimensions: (mindex: 2) Coordinates: * mindex (mindex) MultiIndex - level0 (mindex) int64 0 1 - level1 (mindex) int64 3 4 Data variables: x int64 42 ds.rename({"x": "level0"}) <xarray.Dataset> Dimensions: (mindex: 2) Coordinates: * mindex (mindex) MultiIndex - level0 (mindex) int64 0 1 - level1 (mindex) int64 3 4 Data variables: level0 int64 42 ```

Expected Output

raise a ValueError("conflicting Multiindex names ...")

Problem Description

Using .rename() you can get into a situation where you have a data variable or coordinate with the same name as a multi-index level name.

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: b3d3b4480b7fb63402eb6c02103bb8d6c7dbf93a python: 3.8.0 | packaged by conda-forge | (default, Nov 22 2019, 19:11:38) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 4.4.0-18362-Microsoft machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: None libnetcdf: None xarray: 0.14.1+36.gb3d3b44 pandas: 0.25.3 numpy: 1.18.0 scipy: None netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.9.1 distributed: 2.9.1 matplotlib: None cartopy: None seaborn: None numbagg: None setuptools: 42.0.2.post20191201 pip: 19.3.1 conda: None pytest: 5.3.2 IPython: None sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3657/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue

Advanced export

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

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 19.524ms · About: xarray-datasette