xarray.core.coordinates.DatasetCoordinates#
- class xarray.core.coordinates.DatasetCoordinates(dataset)[source]#
Dictionary like container for Dataset 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__(dataset)assign([coords])Assign new coordinates (and indexes) to a Coordinates object.
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)Check whether two Coordinates objects 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])Return a new object with renamed dimensions only.
rename_vars([name_dict])Return 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.