home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

1 row where state = "open" and user = 8268008 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 1

  • issue 1

state 1

  • open · 1 ✖

repo 1

  • xarray 1
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
267521588 MDU6SXNzdWUyNjc1MjE1ODg= 1646 Make passing a DataArray for the xarray.concat dim argument equivalent to passing a pandas Index ceridwen 8268008 open 0     8 2017-10-23T02:09:58Z 2023-01-08T08:04:40Z   NONE      

Extending from #839, if I'm concatenating some DataArrays using concat,

print(xarray.concat(data, xarray.DataArray(['foo1', 'foo2', 'foo3', 'foo4', 'foo5'], name='stat'))

I get an unnamed dimension without coordinates.

<xarray.DataArray (dim_0: 5, index: 2)> array([[ 24.841064, 0.750451], [ 24.841064, 0.750451], [ 19.062874, 0.796722], [ 14.9631 , 0.354273], [ 14.9631 , 0.354273]]) Coordinates: * index (index) object 'Intercept' 'Lvl' (dim_0) <U3 'foo1' foo2' 'foo3' 'foo4' 'foo5' Dimensions without coordinates: dim_0

Using a pandas.Index,

print(xarray.concat(data, pandas.Index(['foo1', 'foo2', 'foo3', 'foo4', 'foo5'], name='stat'))

<xarray.DataArray (stat: 5, index: 2)> array([[ 14.9631 , 0.354273], [ 19.982272, 0.555708], [ 14.974026, 0.60658 ], [ 24.841064, 0.750451], [ 24.841064, 0.750451]]) Coordinates: * index (index) object 'Intercept' 'Lvl' * stat (stat) object 'foo1' 'foo2' 'foo3' 'foo4' 'foo5'

I want the latter, not the former, but I expected the latter when using a DataArray.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1646/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    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 1176.745ms · About: xarray-datasette