xarray.core.coordinates.DataArrayCoordinates#
- class xarray.core.coordinates.DataArrayCoordinates(dataarray)[source]#
Dictionary like container for DataArray coordinates (variables + indexes).
This collection can be passed directly to the
Dataset
andDataArray
constructors via their coords argument. This will add both the coordinates variables and their index.Methods
__init__
(dataarray)assign
([coords])Assign new coordinates (and indexes) to a Coordinates object, returning a new object with all the original coordinates in addition to the new ones.
copy
([deep, memo])Return a copy of this Coordinates object.
equals
(other)Two Coordinates objects are equal if they have matching variables, all of which are equal.
from_pandas_multiindex
(midx, dim)Wrap a pandas multi-index as Xarray coordinates (dimension + levels).
get
(k[,d])identical
(other)Like equals, but also checks all variable attributes.
items
()keys
()merge
(other)Merge two sets of coordinates to create a new Dataset
Convert these coordinates into a new Dataset.
to_index
([ordered_dims])Convert all index coordinates into a
pandas.Index
.update
(other)Update this Coordinates variables with other coordinate variables.
values
()Attributes
Mapping from dimension names to lengths or tuple of dimension names.
Mapping from coordinate names to dtypes.
Mapping of pandas.Index objects used for label based indexing.
sizes
Mapping from dimension names to lengths.
Low level interface to Coordinates contents as dict of Variable objects.
Mapping of
Index
objects used for label based indexing.