home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 442063346 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • dhirschfeld 3
  • shoyer 2
  • dcherian 1
  • gwgundersen 1
  • sjvrijn 1

author_association 3

  • MEMBER 3
  • NONE 3
  • CONTRIBUTOR 2

issue 1

  • xr.DataArray.to_series returns a (mutable) view · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
728353649 https://github.com/pydata/xarray/issues/2949#issuecomment-728353649 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDcyODM1MzY0OQ== sjvrijn 8833517 2020-11-16T21:58:09Z 2020-11-16T21:58:09Z CONTRIBUTOR

Since PR #3126 seems to be closed due to performance issues, is this underlying issue still considered an issue, or should it be closed?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346
511215090 https://github.com/pydata/xarray/issues/2949#issuecomment-511215090 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDUxMTIxNTA5MA== gwgundersen 2818208 2019-07-14T16:08:12Z 2019-07-14T16:08:12Z CONTRIBUTOR

I've created PR https://github.com/pydata/xarray/pull/3126 to fix this issue.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346
491103705 https://github.com/pydata/xarray/issues/2949#issuecomment-491103705 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDQ5MTEwMzcwNQ== dhirschfeld 881019 2019-05-09T23:36:37Z 2019-05-09T23:36:37Z NONE

..so you'd need to do: ```python

series = array.to_series().copy(deep=False) series.index = series.index.copy(deep=False) series.index.name = 'shallow_copy' series.index.name 'shallow_copy' array.to_series().index.name 'forward_date' ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346
491100027 https://github.com/pydata/xarray/issues/2949#issuecomment-491100027 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDQ5MTEwMDAyNw== dhirschfeld 881019 2019-05-09T23:15:43Z 2019-05-09T23:15:43Z NONE

Unfortunately a shallow copy of a pandas series doesn't shallow copy it's index (I think it should): ```python

series = array.to_series().copy(deep=False) series.index.name = 'shallow_copy' array.to_series().index.name 'shallow_copy' # <--- I'd call this a pandas bug! ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346
491087998 https://github.com/pydata/xarray/issues/2949#issuecomment-491087998 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDQ5MTA4Nzk5OA== shoyer 1217238 2019-05-09T22:17:19Z 2019-05-09T22:17:19Z MEMBER

I don't think we even bother to shallow copy the pandas Index from the DataArray. We should probably do that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346
491062218 https://github.com/pydata/xarray/issues/2949#issuecomment-491062218 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDQ5MTA2MjIxOA== dhirschfeld 881019 2019-05-09T20:53:19Z 2019-05-09T21:00:07Z NONE

Agreed that we definitely don't want to copy the data! I haven't.put in a PR as I think we're a bit hamstrung by pandas' behaviour here so I'm not quite sure how to fix it (without copying the data).

I'm unlikely to get around to a PR in the near term as I'm swamped (and can put up with deep copying the index for now). From my digging about I think the proper fix should be in pandas such that a shallow copy doesn't return a reference to the original name.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346
491034791 https://github.com/pydata/xarray/issues/2949#issuecomment-491034791 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDQ5MTAzNDc5MQ== dcherian 2448579 2019-05-09T19:28:01Z 2019-05-09T19:28:01Z MEMBER

@dhirschfeld can you put together a PR to fix this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346
490966302 https://github.com/pydata/xarray/issues/2949#issuecomment-490966302 https://api.github.com/repos/pydata/xarray/issues/2949 MDEyOklzc3VlQ29tbWVudDQ5MDk2NjMwMg== shoyer 1217238 2019-05-09T16:05:53Z 2019-05-09T16:05:53Z MEMBER

I would tend to agree here -- the only data for which we want to use views are (potentially large) numpy arrays.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataArray.to_series returns a (mutable) view 442063346

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 19.19ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows