home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 445745470 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 3

  • shoyer 2
  • dcherian 1
  • Huite 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 1

issue 1

  • ENH: Preserve monotonic descending index order when merging · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
496052425 https://github.com/pydata/xarray/pull/2972#issuecomment-496052425 https://api.github.com/repos/pydata/xarray/issues/2972 MDEyOklzc3VlQ29tbWVudDQ5NjA1MjQyNQ== shoyer 1217238 2019-05-27T01:52:29Z 2019-05-27T01:52:29Z MEMBER

Yes, I do think this deviation from pandas would make sense -- though it would be even better if we could convince pandas to make the same change!

We already have low-level tools for controlling how alignment works (construct the index yourself and use .reindex), but we should make the default behavior as user friendly as possible.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Preserve monotonic descending index order when merging 445745470
494078236 https://github.com/pydata/xarray/pull/2972#issuecomment-494078236 https://api.github.com/repos/pydata/xarray/issues/2972 MDEyOklzc3VlQ29tbWVudDQ5NDA3ODIzNg== dcherian 2448579 2019-05-20T17:24:55Z 2019-05-20T17:24:55Z MEMBER

From a user perspective, I think it's plain weird to merge a bunch of datasets with montonically decreasing coordinates and land up with a new dataset that has monotonically increasing coordinates.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Preserve monotonic descending index order when merging 445745470
493798254 https://github.com/pydata/xarray/pull/2972#issuecomment-493798254 https://api.github.com/repos/pydata/xarray/issues/2972 MDEyOklzc3VlQ29tbWVudDQ5Mzc5ODI1NA== Huite 13662783 2019-05-19T22:41:49Z 2019-05-19T22:46:06Z CONTRIBUTOR

I'm definitely not convinced it's a great idea either; a pull request is hopefully the best way to get some discussion going! Putting it in the _get_joiner is definitely the sensible choice, and the last suggestion is definitely more clear to me.

I've had a bit more thought and maybe it's useful to consider what xarray's philosophy about these things is. I think flexibility is a primary concern and generally, things *just work*. The reason I'm running into issues here is because I'm writing some code which operates on DataArrays, which isn't nearly as robust or flexible, and doesn't just work.

The answer in this case might be that I should be using xarray's powerful alignment machinery to do the work for me, rather than to assume/demand certain features of the data. Of course, that requires some digging into how xarray does alignment. But I'd end up with a more flexible tool in the end.

Perhaps that should be the general rule: if you're extending xarray, like xarray, don't rely too much about your coordinates staying the way they are. Maybe such a description could belong in the xarray Internals page just to make it explicit.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Preserve monotonic descending index order when merging 445745470
493782708 https://github.com/pydata/xarray/pull/2972#issuecomment-493782708 https://api.github.com/repos/pydata/xarray/issues/2972 MDEyOklzc3VlQ29tbWVudDQ5Mzc4MjcwOA== shoyer 1217238 2019-05-19T19:04:42Z 2019-05-19T19:04:42Z MEMBER

I'm not entirely sure this is a good idea -- a discrepancy in the behavior of an outer join between pandas seems non-ideal. Perhaps somebody else has opinions about whether this would be worthwhile?

If we do want to do this, let's put the change inside the _get_joiner function. Specifically, instead of python def _get_joiner(join): if join == 'outer': return functools.partial(functools.reduce, operator.or_) you could write something like: ```python def outer_join(indexes): index = functools.reduce(indexes, operator.or) # your logic for reverse sorting the result return index

def _get_joiner(join): if join == 'outer': return _outer_join ```

Note that operator.or_ on a pandas.Index is the same thing as pandas.Index.union, so this could be equivalently written (maybe more clearly) as: python def _outer_join(indexes): index = indexes[0] for other in indexes[1:] index = index.union(other) # your logic for reverse sorting the result return index

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Preserve monotonic descending index order when merging 445745470

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