title: xarray - how to rename dimensions on a DataArray object
body: <p>I have a DataArray object named rio.</p>
  
  <pre><code>In [59]: rio
  Out[59]: 
  &lt;xarray.DataArray (band: 1, y: 106, x: 193)&gt;
  array([[[0, 0, ..., 0, 0],
          [0, 0, ..., 0, 0],
          ...,
          [0, 0, ..., 0, 0],
          [0, 0, ..., 0, 0]]], dtype=uint8)
  Coordinates:
    * band     (band) int32 1
    * y        (y) float64 -33.9 -33.95 -34.0 -34.05 ... -39.05 -39.1 -39.15 -39.2
    * x        (x) float64 140.8 140.8 140.9 140.9 ... 149.9 149.9 150.0 150.0
  Attributes:
      transform:   (0.04791259799999997, 0.0, 140.776046753, 0.0, -0.0504760740...
      crs:         +init=epsg:4326
      res:         (0.04791259799999997, 0.05047607400000004)
      is_tiled:    1
      nodatavals:  (255.0,)
  </code></pre>
  
  <p>I would like to rename y to latitude and x to longitude. So the resulted rio object will be:</p>
  
  <pre><code>In [59]: rio
  Out[59]: 
  &lt;xarray.DataArray (band: 1, latitude: 106, longitude: 193)&gt;
  array([[[0, 0, ..., 0, 0],
          [0, 0, ..., 0, 0],
          ...,
          [0, 0, ..., 0, 0],
          [0, 0, ..., 0, 0]]], dtype=uint8)
  Coordinates:
    * band     (band) int32 1
    * latitude         (latitude) float64 -33.9 -33.95 -34.0 -34.05 ... -39.05 -39.1 -39.15 -39.2
    * longitude        (longitude) float64 140.8 140.8 140.9 140.9 ... 149.9 149.9 150.0 150.0
  Attributes:
      transform:   (0.04791259799999997, 0.0, 140.776046753, 0.0, -0.0504760740...
      crs:         +init=epsg:4326
      res:         (0.04791259799999997, 0.05047607400000004)
      is_tiled:    1
      nodatavals:  (255.0,)
  </code></pre>
  
  <p>I need help on what methods I should use on the DataArray class?</p>