home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 30656827

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
30656827 MDExOlB1bGxSZXF1ZXN0MTQyNjExNDc= 88 ENH: Better Dataset repr 1217238 closed 0     2 2014-04-02T03:24:50Z 2014-06-12T17:29:15Z 2014-04-09T03:15:49Z MEMBER   0 pydata/xarray/pulls/88

@toddsmall and @hdail both reported surprise that the order of dimensions as printed in a Dataset's string representation are not necessarily the same as the order of any variable dimensions.

This patch alters Dataset.__repr__ so the order of the dimensions for each variable is now printed. Hopefully this should make things clearer.

Example of the new look:

<xray.Dataset> Dimensions: (dim1: 100, dim2: 50, dim3: 10, time: 20) Coordinates: dim1 X dim2 X dim3 X time X Noncoordinates: var1 0 1 var2 0 1 var3 1 0 Attributes: Empty

Vs. the old look:

<xray.Dataset> Coordinates: (dim1: 100, dim2: 50, dim3: 10, time: 20) Non-coordinates: var1 X X - - var2 X X - - var3 X - X - Attributes: Empty

I added Coordinates to make it clear that these are items in the Dataset. I removed the dashes - because they added visual noise that made it harder to read the axis numbers.

Note: the commits for this PR are applied on top of those for #83, so they can be merged sequentially without the need to rebase.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/88/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.467ms · About: xarray-datasette