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
DatasetandDataArrayconstructors 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.
drop_dims(drop_dims, *[, errors])Drop dimensions and associated variables from this dataset.
drop_vars(names, *[, errors])Drop variables from 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).
from_xindex(index)Create Xarray coordinates from an existing Xarray index.
get(k[,d])identical(other)Like equals, but also checks all variable attributes.
items()keys()merge(other, *[, compat])Merge two sets of coordinates to create a new Dataset
rename_dims([dims_dict])Returns a new object with renamed dimensions only.
rename_vars([name_dict])Returns a new object with renamed variables.
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.
Mapping from dimension names to lengths.
Low level interface to Coordinates contents as dict of Variable objects.
Mapping of
Indexobjects used for label based indexing.