Skip to content

Dataset.__repr__ should show array values #206

Closed
@shoyer

Description

@shoyer

This would be much more useful than the grid of coordinate dimensions we show now -- though we could keep that under another alias (e.g. 'dim_info()')

Something like the following would be great (inspired by R's str function):

<xray.Dataset>
Dimensions:    (time: 500, location: 57, realization: 10)
Coordinate indexes:
  time         2000-01-01 2000-01-02 2003-12-31 ...
  location     'california 'oregon' 'washington' 'idaho' ...
  realization  0 1 2 3 4 5 6 7 ... 
Other coordinates:
  latitude     (location,) 43.0 43.5 44.0 44.5 45.0 ...
  longitude    (location,) -90 -89 -88 -87 -86 -85 ...
  ref_time     () 1999-12-31
Variables:
  temperature  (time, location, realization) 1.22 2.35 3.22 -2.33 ...
  tmin         (location, realization) -3.34 2.52 3.53 5.33 4.23 ...
Attributes:
  Empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions