Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset.__repr__ should show array values #206

Closed
shoyer opened this issue Aug 5, 2014 · 0 comments · Fixed by #220
Closed

Dataset.__repr__ should show array values #206

shoyer opened this issue Aug 5, 2014 · 0 comments · Fixed by #220

Comments

@shoyer
Copy link
Member

shoyer commented Aug 5, 2014

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
shoyer added a commit to shoyer/xarray that referenced this issue Aug 24, 2014
Ideally the output would be better aligned between rows and do a better
job of deciding when to show array values rather than just checking if the
array is in memory, but this is good enough for now.

Fixes pydata#206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant