home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "NONE", issue = 130753818 and user = 4304478 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • JamesPHoughton · 2 ✖

issue 1

  • merge and align DataArrays/Datasets on different domains · 2 ✖

author_association 1

  • NONE · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
226486770 https://github.com/pydata/xarray/issues/742#issuecomment-226486770 https://api.github.com/repos/pydata/xarray/issues/742 MDEyOklzc3VlQ29tbWVudDIyNjQ4Njc3MA== JamesPHoughton 4304478 2016-06-16T13:36:28Z 2016-06-16T13:37:44Z NONE

Something akin to the pandas dataframe update would have value - then you could create an empty array structure and populate it as necessary:

python import pandas as pd df = pd.DataFrame(index=range(5), columns=['a','b','c','d']) df2 = pd.DataFrame(index=range(3), columns=['a'], data=range(3)) df.update(df2)

a b c d 0 0 NaN NaN NaN 1 1 NaN NaN NaN 2 2 NaN NaN NaN 3 NaN NaN NaN NaN 4 NaN NaN NaN NaN

But, not sure if empty array construction is supported?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  merge and align DataArrays/Datasets on different domains 130753818
226003087 https://github.com/pydata/xarray/issues/742#issuecomment-226003087 https://api.github.com/repos/pydata/xarray/issues/742 MDEyOklzc3VlQ29tbWVudDIyNjAwMzA4Nw== JamesPHoughton 4304478 2016-06-14T20:18:11Z 2016-06-14T20:18:11Z NONE

I'm having a similar issue, expanding the complexity in that I want to concatenate across multiple dimensions. I'm not sure if that's a cogent way to explain it, but here's an example. I have:

python m = xr.DataArray(data=[[[1.1, 1.2, 1.3]]], coords={'Dim1': ['A', 'B', 'C'], 'Dim2':['D'], 'Dim3':['F']}) n = xr.DataArray(data=[[[2.1, 2.2, 2.3]]], coords={'Dim1': ['A', 'B', 'C'], 'Dim2':['E'], 'Dim3':['F']}) o = xr.DataArray(data=[[[3.1, 3.2, 3.3]]], coords={'Dim1': ['A', 'B', 'C'], 'Dim2':['D'], 'Dim3':['G']}) p = xr.DataArray(data=[[[4.1, 4.2, 4.3]]], coords={'Dim1': ['A', 'B', 'C'], 'Dim2':['E'], 'Dim3':['G']})

Which I want to merge into a single, fully populated array similar to what I'd get if I did:

``` python data =[[[ 1.1, 1.2, 1.3], [ 3.1, 3.2, 3.3]],

   [[ 2.1,  2.2,  2.3],
    [ 4.1,  4.2,  4.3]]]

xr.DataArray(data=data, coords={'Dim1': ['A', 'B', 'C'], 'Dim2':['D', 'E'], 'Dim3':['F', 'G']}) ```

i.e.

``` python <xarray.DataArray (Dim2: 2, Dim3: 2, Dim1: 3)> array([[[ 1.1, 1.2, 1.3], [ 3.1, 3.2, 3.3]],

   [[ 2.1,  2.2,  2.3],
    [ 4.1,  4.2,  4.3]]])

Coordinates: * Dim2 (Dim2) |S1 'D' 'E' * Dim3 (Dim3) |S1 'F' 'G' * Dim1 (Dim1) |S1 'A' 'B' 'C' ```

@jcmgray's function is pretty close, although the array indicies are described slightly differently (I'm not sure if this is a big deal or not...). Note the 'object' type for Dim2 and Dim3:

``` python <xarray.DataArray (Dim2: 2, Dim3: 2, Dim1: 3)> array([[[ 1.1, 1.2, 1.3], [ 3.1, 3.2, 3.3]],

   [[ 2.1,  2.2,  2.3],
    [ 4.1,  4.2,  4.3]]])

Coordinates: * Dim2 (Dim2) object 'D' 'E' * Dim3 (Dim3) object 'F' 'G' * Dim1 (Dim1) |S1 'A' 'B' 'C' ```

It would be great to have a canonical way to do this. What should I try?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  merge and align DataArrays/Datasets on different domains 130753818

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