home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 445175953 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • dcherian 1
  • bradyrx 1

author_association 2

  • CONTRIBUTOR 1
  • MEMBER 1

issue 1

  • `where` function mis-broadcasts and alters data type on dataset · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
494059784 https://github.com/pydata/xarray/issues/2969#issuecomment-494059784 https://api.github.com/repos/pydata/xarray/issues/2969 MDEyOklzc3VlQ29tbWVudDQ5NDA1OTc4NA== bradyrx 8881170 2019-05-20T16:30:02Z 2019-05-20T16:30:02Z CONTRIBUTOR

Thanks for the feedback and link to the other issue. I wasn't sure what to search to find other issues on this. The coordinate transformation seems like the most straightforward approach.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `where` function mis-broadcasts and alters data type on dataset 445175953
493249273 https://github.com/pydata/xarray/issues/2969#issuecomment-493249273 https://api.github.com/repos/pydata/xarray/issues/2969 MDEyOklzc3VlQ29tbWVudDQ5MzI0OTI3Mw== dcherian 2448579 2019-05-16T22:10:32Z 2019-05-16T22:10:32Z MEMBER
  1. This has been reported before e.g. #1234 . I think we need a kwarg to control this behaviour. You can avoid this here by making dateVar a coordinate which seems logical in this case. ds = ds.rename({'dateVar': 'time'}).set_coords('time')

  2. This is because where fills in NaNs which is not representable by variables with int datatype. So xarray casts the variable to float. I guess we could avoid this when drop=True but not when drop=False. You can fix this partially by setting indexVar to be a co-ordinate which again seems logical in this case.

``` ds = (ds.rename({'dateVar': 'time', 'indexVar': 'N'}) .set_coords(['time', 'N']))

print(ds)

ds.where(ds.N > 50, drop=True) ```

gives me

``` <xarray.Dataset> Dimensions: (N: 100, time: 120) Coordinates: * N (N) int64 0 1 2 3 4 5 6 7 8 9 10 ... 90 91 92 93 94 95 96 97 98 99 * time (time) datetime64[ns] 2005-02-01 2005-02-02 ... 2005-05-31 Data variables: floatVar (time, N) float64 0.2382 0.9297 0.5391 ... 0.9527 0.6448 0.08718 intVar (time, N) int64 9 5 7 9 9 3 3 2 2 8 4 1 ... 8 9 1 8 1 8 9 5 7 4 4

<xarray.Dataset> Dimensions: (N: 49, time: 120) Coordinates: * N (N) int64 51 52 53 54 55 56 57 58 59 ... 92 93 94 95 96 97 98 99 * time (time) datetime64[ns] 2005-02-01 2005-02-02 ... 2005-05-31 Data variables: floatVar (time, N) float64 0.5974 0.09831 0.3858 ... 0.9527 0.6448 0.08718 intVar (time, N) float64 3.0 8.0 7.0 5.0 4.0 4.0 ... 9.0 5.0 7.0 4.0 4.0 ```

intVar has still been converted to float so you'll need to fix that manually.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `where` function mis-broadcasts and alters data type on dataset 445175953

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