home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 200125945 and user = 1217238 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 1

  • shoyer · 13 ✖

issue 1

  • Document the new __repr__ · 13 ✖

author_association 1

  • MEMBER 13
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
275958819 https://github.com/pydata/xarray/issues/1199#issuecomment-275958819 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3NTk1ODgxOQ== shoyer 1217238 2017-01-30T00:27:10Z 2017-01-30T00:27:10Z MEMBER

See #1236 for a proposed fix. After merging it, I will release v0.9.1 and issue the delayed release announcement for xarray v0.9.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
275726081 https://github.com/pydata/xarray/issues/1199#issuecomment-275726081 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3NTcyNjA4MQ== shoyer 1217238 2017-01-27T17:41:50Z 2017-01-27T17:41:50Z MEMBER

Nice diagram! Do you think it's worth to also add Variable and IndexVariable (along with inheritance)?

Yes, but probably only for a separate "internal/advanced API" diagram. I want this to focus on the user facing and public API.

Although this wouldn't fully solve the problem, maybe an html repr for the notebook would help here?

Indeed, I think this is quite possible -- we could squeeze a lot more information into an HTML repr. For example, with a little bit of JavaScript (or maybe CSS these days?) we could highlight all appearances of a dimension name when you hover over it. Maybe we can find someone with design talent/interest to work on this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
275717242 https://github.com/pydata/xarray/issues/1199#issuecomment-275717242 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3NTcxNzI0Mg== shoyer 1217238 2017-01-27T17:04:53Z 2017-01-27T17:04:53Z MEMBER

Perhaps more broadly documentation-wise, it might be good to add a terminology list. For example, that could clarify the difference and relation between dimensions, labels, indices, coordinates, etc.. There are dimensions without coordinates, dimensions that are labelled or unlabelled, there are coordinates that are indices, coordinates that are not indices. I'm still figuring out how all of those relate to each other and how I use them.

Agreed, this is definitely worth doing. I also made a diagram recently to summarize the xarray data model that I'd like to put in the docs:

(feedback on the diagram is very welcome if anyone has suggestions!)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
275716286 https://github.com/pydata/xarray/issues/1199#issuecomment-275716286 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3NTcxNjI4Ng== shoyer 1217238 2017-01-27T17:00:44Z 2017-01-27T17:00:44Z MEMBER

In the SO post, the OP also wondered about the "empty" coordinates. Any plan to change this too? Maybe a - instead of empty?

I think I want to remove the appearance of *empty* for coordinates, and maybe for data variables, too. The intent was to remove confusion about missing fields in the repr, to avoid something like <xarray.Dataset> Dimensions: () for xr.Dataset().

It gives a subtle signal that the user is doing something wrong, but that isn't necessarily the case.

I'd add another suggestion to the list that @shoyer proposed, which is simply to do nothing with the unindexed dimensions

Yes, this is what I did originally, and I think it's a very elegant solution.

Unfortunately, for large Dataset objects, there were valid complaints it can be easy to miss dimensions without coordinates. There's some threshold, probably around five or so items, at which point it becomes hard to see at a glance what's missing from a list.

I don't see it working well to make repr change suddenly when a certain threshold number of items is reached, but maybe there's another way (a different method? an option?) we can use for exposing this information to the power-users who need to see it without making it confusing for newcomers.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
275562086 https://github.com/pydata/xarray/issues/1199#issuecomment-275562086 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3NTU2MjA4Ng== shoyer 1217238 2017-01-27T01:01:50Z 2017-01-27T01:01:50Z MEMBER

Any use case for dimensions which don't have an index (i.e., an IndexVariable) but have coordinates? This would be confusing too:

I suppose we do something even more explicit, e.g., "Dimensions without a corresponding coordinate". That feels too long to me, though.

I don't like "Dimensions without index variable" because it emphasizes that they don't have an index rather than that they don't have a variable.

For now I think "Dimensions without coordinates" is my favorite.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
275463531 https://github.com/pydata/xarray/issues/1199#issuecomment-275463531 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3NTQ2MzUzMQ== shoyer 1217238 2017-01-26T18:06:14Z 2017-01-26T18:06:14Z MEMBER

OK, let's go back to the drawing board.

Let ds = xr.Dataset({'foo': (('x', 'y'), [[1, 2], [3, 4]])}, {'x': [1, 2]}).

Current repr (v0.9.0): <xarray.Dataset> Dimensions: (x: 2, y: 2) Coordinates: * x (x) int64 1 2 Unindexed dimensions: y Data variables: foo (x, y) int64 1 2 3 4

Some alternatives:

  • Rename "Unindexed dimensions" to "Dimensions without coordinates". This is clearer but pretty verbose: ``` <xarray.Dataset> Dimensions: (x: 2, y: 2) Coordinates:
  • x (x) int64 1 2 Dimensions without coordinates: y Data variables: foo (x, y) int64 1 2 3 4 ```

  • Same as above, but with everything on one line (less obtrusive): ``` <xarray.Dataset> Dimensions: (x: 2, y: 2) Coordinates:

  • x (x) int64 1 2 Data variables: foo (x, y) int64 1 2 3 4 Dimensions without coordinates: y ```

  • Mark Dimensions with an index with * before there name. @crusaderky suggested this previously but I rejected it as ugly: ``` <xarray.Dataset> Dimensions: (*x: 2, y: 2) Coordinates:

  • x (x) int64 1 2 Data variables: foo (x, y) int64 1 2 3 4 ```

  • Use another marker character in Dimensions, maybe ' after dimension names for dimensions with indexes? ``` <xarray.Dataset> Dimensions: (x': 2, y: 2) Coordinates:

  • x (x) int64 1 2 Data variables: foo (x, y) int64 1 2 3 4 ```
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
275460938 https://github.com/pydata/xarray/issues/1199#issuecomment-275460938 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3NTQ2MDkzOA== shoyer 1217238 2017-01-26T17:56:53Z 2017-01-26T17:56:53Z MEMBER

We may not have gotten this right yet. See StackOverflow: What are “unindexed dimensions” and why are coordinates empty?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
273982496 https://github.com/pydata/xarray/issues/1199#issuecomment-273982496 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3Mzk4MjQ5Ng== shoyer 1217238 2017-01-20T05:41:25Z 2017-01-20T05:41:25Z MEMBER

See #1221.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
273942386 https://github.com/pydata/xarray/issues/1199#issuecomment-273942386 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3Mzk0MjM4Ng== shoyer 1217238 2017-01-20T00:30:56Z 2017-01-20T00:30:56Z MEMBER

OK, I'm going to put together a PR to change this behavior to add the Unindexed dimensions section instead of putting these dimensions under Coordinates.

This feels a little overly verbose (I still feel like there may be some sort of solution with symbols here), but it's explicit and fully self-explanatory, which is a big advantage of over what we currently have.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
273252998 https://github.com/pydata/xarray/issues/1199#issuecomment-273252998 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3MzI1Mjk5OA== shoyer 1217238 2017-01-17T18:19:46Z 2017-01-17T18:19:46Z MEMBER

Sorry, I'm not sure to understand: do you mean you'd rather stay with the current behavior as you said in #1017 (comment) ?

I like the currently implemented behavior, which is the second bullet in https://github.com/pydata/xarray/pull/1017#issuecomment-249908900. We could potentially switch to the behavior of the first bullet (issue TypeError instead), but I think this would be less convenient.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
272995758 https://github.com/pydata/xarray/issues/1199#issuecomment-272995758 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3Mjk5NTc1OA== shoyer 1217238 2017-01-17T01:02:46Z 2017-01-17T01:02:46Z MEMBER

I actually think that .sel() shoud not work on y. I understand that this would break a bunch of existing code, but this is a confusing (if not inconsistent) behavior.

See https://github.com/pydata/xarray/pull/1017#issuecomment-249908900 and discussion below for comments on this. This does make .sel a little more complex, but I think it's pretty reasonable given that the fall-back behavior is well defined and not value dependent like pandas's soon to be deprecated .ix.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
272670249 https://github.com/pydata/xarray/issues/1199#issuecomment-272670249 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3MjY3MDI0OQ== shoyer 1217238 2017-01-15T03:06:25Z 2017-01-15T03:08:51Z MEMBER

I wonder if instead this should be taken as an indication that we need to make the repr more self explanatory, e.g., by writing something like *missing* instead of -. This would be consistent with how we use *empty* in the Dataset repr for empty coords or data_vars.

Current version: <xarray.Dataset> Dimensions: (dim_0: 3) Coordinates: o dim_0 (dim_0) - Data variables: var (dim_0) int64 1 2 3 Alternative A: write *missing* instead of -: <xarray.Dataset> Dimensions: (dim_0: 3) Coordinates: o dim_0 (dim_0) *missing* Data variables: var (dim_0) int64 1 2 3 Alternative B: write *missing* instead of -, use * for the marker instead of o: <xarray.Dataset> Dimensions: (dim_0: 3) Coordinates: * dim_0 (dim_0) *missing* Data variables: var (dim_0) int64 1 2 3

I think I like Alternative B best. @MaximilianR @crusaderky @benbovy any opinions?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945
271929015 https://github.com/pydata/xarray/issues/1199#issuecomment-271929015 https://api.github.com/repos/pydata/xarray/issues/1199 MDEyOklzc3VlQ29tbWVudDI3MTkyOTAxNQ== shoyer 1217238 2017-01-11T17:10:20Z 2017-01-11T17:10:20Z MEMBER

Agreed, we should definitely document this and highlight the change in the release notes. I'm still not super happy with using o in the new repr, but it is the best we came up with so far.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Document the new __repr__ 200125945

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