Skip to content

we need some way to see the attributes on all arrays in a dataset #244

Closed
@shoyer

Description

@shoyer

Options:

  1. Display array attributes in the dataset repr, e.g., perhaps something like this:

    <xray.Dataset>
    Dimensions:         (time: 3, x: 2, y: 2)
    Coordinates:
        lat             (x, y) float64 42.25 42.21 42.63 42.59
        reference_time  datetime64[ns] 2014-09-05
        lon             (x, y) float64 -99.83 -99.32 -99.79 -99.23
      * time            (time) datetime64[ns] 2014-09-06 2014-09-07 2014-09-08
      * x               (x) int64 0 1
      * y               (y) int64 0 1
    Variables:
        precipitation   (x, y, time) float64 5.904 2.453 3.404 9.847 9.195 0.3777 8.615 7.536 ...
        temperature     (x, y, time) float64 11.04 23.57 20.77 9.346 6.683 17.17 11.6 19.54 ...
    Attributes:
        lat:
            units: degrees_east
        lon:
            units: degrees_north
        precipitation:
            units: mm
        temperature:
            units: degrees_C
    
  2. Add a method or attribute like attrs_map that collects everything together into a single mapping (sort of like DAS in OpenDAP: http://www.opendap.org/api/javaDocs/opendap/dap/DAS.html).

I am leaning toward the later option right now.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions