home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 121569683 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 2

  • shoyer 4
  • max-sixty 4

issue 1

  • Should Dataset constructor align DataArrays based on coords? · 8 ✖

author_association 1

  • MEMBER 8
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
350883925 https://github.com/pydata/xarray/issues/674#issuecomment-350883925 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDM1MDg4MzkyNQ== shoyer 1217238 2017-12-11T22:47:13Z 2017-12-11T22:47:26Z MEMBER

Yes. I think we have some existing internal machinery for this in align (see indexes). Indexes that are explicitly provided in coords (e.g., coords={'time': time_values}) should take precedence. Indexes that are incidentally included on another coordinate should not (e.g., coords={'day_of_week': DataArray(values, coords=[('time', time_values)])}).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683
350843335 https://github.com/pydata/xarray/issues/674#issuecomment-350843335 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDM1MDg0MzMzNQ== max-sixty 5635139 2017-12-11T20:10:40Z 2017-12-11T20:10:40Z MEMBER

OK great! To confirm: you're up for (1) - i.e. coords set the index; rather than an outer join with all available indexes.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683
350839237 https://github.com/pydata/xarray/issues/674#issuecomment-350839237 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDM1MDgzOTIzNw== shoyer 1217238 2017-12-11T19:56:19Z 2017-12-11T19:56:19Z MEMBER

Yes, I think there is a good case that explicitly provided coords should reindex the data. Possibly we should save this for the next major release (0.11) but it should happen. These cases currently result in an error so I'm not worried about backwards compatibility.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683
350527584 https://github.com/pydata/xarray/issues/674#issuecomment-350527584 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDM1MDUyNzU4NA== max-sixty 5635139 2017-12-10T06:10:07Z 2017-12-10T06:10:07Z MEMBER

I'd be up for implementing this, if people agree. Let me know...

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683
164040753 https://github.com/pydata/xarray/issues/674#issuecomment-164040753 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDE2NDA0MDc1Mw== max-sixty 5635139 2015-12-11T20:31:00Z 2015-12-11T20:31:00Z MEMBER

On reflection, I favor (1) pretty clearly. I don't have much experience with XRay, so I trust you more than I trust myself, but: - In our use cases, we care about exactly what the axes / coords are. So we need some single source of truth there. If I implemented this using the outer join, we wouldn't use it much! - I can't clearly visualize the use cases supporting the other side - where users have coords that they want to add 'in addition', but that aren't on a DataArray they're supplying. - I haven't heard of people being confused on the pandas index= parameter (although I'm absent from SO discussions etc, so may have missed them)

Let me know your thoughts. We should pick the right way, not the preference of the person implementing it, so chose what you think is best.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683
163756773 https://github.com/pydata/xarray/issues/674#issuecomment-163756773 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDE2Mzc1Njc3Mw== shoyer 1217238 2015-12-10T21:38:08Z 2015-12-10T21:38:08Z MEMBER

I'm sort of on the fence :). Pandas actually does (1), so there is some precedence for this:

``` In [12]: import pandas as pd

In [13]: df = pd.DataFrame({'x': list('abc')})

In [14]: df Out[14]: x 0 a 1 b 2 c

In [15]: pd.DataFrame(df, index=[1, 2]) Out[15]: x 1 b 2 c ```

That said, I know this has been a point of confusion for new pandas users, and I do like the current property of the Dataset constructor that it never removes data via alignment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683
163748764 https://github.com/pydata/xarray/issues/674#issuecomment-163748764 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDE2Mzc0ODc2NA== max-sixty 5635139 2015-12-10T21:04:18Z 2015-12-10T21:18:08Z MEMBER

I don't see any obvious reason reason why coords should be treated differently than data_vars as far as data alignment in the Dataset constructor goes.

Two possibilities: 1. coords would take precedence, and all the DataArrays would be aligned to those. This is equivalent to the second example where arrays are added on with __setitem__ after construction 2. Everything is aligned with an outer join, nothing takes precedence (which I think means the constructor can never fail for alignment reasons)

I would favor (1), since you can be explicit about what coords you want to end up with; if you don't have a preference, you can neglect to supply coords and get the outer join.

But it sounds like you may favor (2)?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683
163747222 https://github.com/pydata/xarray/issues/674#issuecomment-163747222 https://api.github.com/repos/pydata/xarray/issues/674 MDEyOklzc3VlQ29tbWVudDE2Mzc0NzIyMg== shoyer 1217238 2015-12-10T20:57:48Z 2015-12-10T20:57:48Z MEMBER

Is this desired behavior? I could imagine aligning to coords if they are explicitly supplied, but I don't know the nuances here.

Yes, I think aligning to coords (with an outer join) would probably be a good addition. This was not an intentional omission, just a scenario I did not anticipate. I don't see any obvious reason reason why coords should be treated differently than data_vars as far as data alignment in the Dataset constructor goes.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Dataset constructor align DataArrays based on coords? 121569683

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