xarray.core.coordinates.DataArrayCoordinates

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 and DataArray constructors via their coords argument. This will add both the coordinates variables and their index.

__init__(dataarray)[source]#

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

to_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

dims

Mapping from dimension names to lengths or tuple of dimension names.

dtypes

Mapping from coordinate names to dtypes.

indexes

Mapping of pandas.Index objects used for label based indexing.

sizes

Mapping from dimension names to lengths.

variables

Low level interface to Coordinates contents as dict of Variable objects.

xindexes

Mapping of Index objects used for label based indexing.