home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 602793814 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • ray306 1
  • keewis 1
  • JavierRuano 1
  • TomNicholas 1

author_association 2

  • MEMBER 2
  • NONE 2

issue 1

  • Support flexible DataArray shapes in Dataset · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
619635716 https://github.com/pydata/xarray/issues/3984#issuecomment-619635716 https://api.github.com/repos/pydata/xarray/issues/3984 MDEyOklzc3VlQ29tbWVudDYxOTYzNTcxNg== ray306 1559890 2020-04-26T22:38:20Z 2020-04-26T22:38:20Z NONE

Your both methods worked! Thank you!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support flexible DataArray shapes in Dataset  602793814
616503710 https://github.com/pydata/xarray/issues/3984#issuecomment-616503710 https://api.github.com/repos/pydata/xarray/issues/3984 MDEyOklzc3VlQ29tbWVudDYxNjUwMzcxMA== TomNicholas 35968931 2020-04-20T11:54:07Z 2020-04-20T11:54:07Z MEMBER

@keewis your answer (and a clarification that we can't do real "ragged" arrays) would make a useful cookbook or StackOverflow answer, since I suspect a lot of people have this question.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support flexible DataArray shapes in Dataset  602793814
616211072 https://github.com/pydata/xarray/issues/3984#issuecomment-616211072 https://api.github.com/repos/pydata/xarray/issues/3984 MDEyOklzc3VlQ29tbWVudDYxNjIxMTA3Mg== keewis 14808389 2020-04-19T19:24:51Z 2020-04-20T10:35:44Z MEMBER

this ultimately depends on how the last dimension of A and B are related (or rather, how you want to model the relationship). If they are not related at all, simply use different dimension names: python In [2]: da1 = xr.DataArray(np.empty(shape=(2, 5, 100)), dims=("x", "y", "z1")) ...: da2 = xr.DataArray(np.empty(shape=(2, 5, 101)), dims=("x", "y", "z2")) ...: ds = xr.Dataset({"a": da1, "b": da2}) ...: ds Out[2]: <xarray.Dataset> Dimensions: (x: 2, y: 5, z1: 100, z2: 101) Dimensions without coordinates: x, y, z1, z2 Data variables: a (x, y, z1) float64 6.901e-310 6.901e-310 4.67e-310 ... 0.0 0.0 0.0 b (x, y, z2) float64 6.901e-310 6.901e-310 4.67e-310 ... 0.0 0.0 0.0

If they are related, assign coordinates to the dimensions: python In [3]: da1 = xr.DataArray( ...: np.empty(shape=(2, 5, 100)), ...: dims=("x", "y", "z"), ...: coords={"z": np.arange(100)}, ...: ) ...: da2 = xr.DataArray( ...: np.empty(shape=(2, 5, 101)), ...: dims=("x", "y", "z"), ...: coords={"z": np.arange(101)}, ...: ) ...: ds = xr.Dataset({"a": da1, "b": da2}) ...: ds Out[3]: <xarray.Dataset> Dimensions: (x: 2, y: 5, z: 101) Coordinates: * z (z) int64 0 1 2 3 4 5 6 7 8 9 10 ... 91 92 93 94 95 96 97 98 99 100 Dimensions without coordinates: x, y Data variables: a (x, y, z) float64 6.901e-310 6.901e-310 ... 6.917e-323 nan b (x, y, z) float64 6.901e-310 6.901e-310 ... 6.901e-310 -6.35e+53 In this case, A does not have the label z=100, so it is treated as missing (you should be familiar with the concept of "missing values" since you know pandas).

{
    "total_count": 4,
    "+1": 4,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support flexible DataArray shapes in Dataset  602793814
616214519 https://github.com/pydata/xarray/issues/3984#issuecomment-616214519 https://api.github.com/repos/pydata/xarray/issues/3984 MDEyOklzc3VlQ29tbWVudDYxNjIxNDUxOQ== JavierRuano 34353851 2020-04-19T19:49:19Z 2020-04-19T19:49:19Z NONE

I dont try it, but i know your problem. If you try to create from dataarray df.to_dataset(name='participant_A') df.to_dataset(name='participant_B') and after merge them?

xr.merge([ds1, ds2], compat='no_conflicts')

http://xarray.pydata.org/en/stable/combining.html

In potter case you could create nan values to create the same dimensions.

But i have never tried. I found another solution for my data, but it was my alternative.

El dom., 19 abr. 2020 20:57, (Ray) Jinbiao Yang notifications@github.com escribió:

I always use Pandas to deal with my neuroscience data (multi-dimension). It is annoying to stack and unstack all the time and I heard Xarray is designed for multi-dimension data.

In neuroscience research, we usually have multiple participants and we will test them different times, which means the data may look like this:

  • participant A:
    • 25100 matrix
  • participant B:
    • 25101 matrix

(100 and 101 are the testing times)

But Dataset doesn't support to have 25100 DataArray and 25101 DataArray together. Is there any solution to deal with that kind of data in Xarray?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/issues/3984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIGDFO4X4KQA5WPOVUEQQVLRNNCRJANCNFSM4ML467MA .

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support flexible DataArray shapes in Dataset  602793814

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