API reference

This page provides an auto-generated summary of xarray’s API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

See also: What parts of xarray are considered public API?

Top-level functions

Dataset

Creating a dataset

Attributes

Dictionary interface

Datasets implement the mapping interface with keys given by variable names and values given by DataArray objects.

Dataset contents

Comparisons

Indexing

Missing value handling

Computation

Aggregation

ndarray methods

Reshaping and reorganizing

DataArray

Attributes

ndarray attributes

DataArray contents

Indexing

Missing value handling

Comparisons

Computation

Aggregation

ndarray methods

String manipulation

Datetimelike properties

Datetime properties:

Datetime methods:

Timedelta properties:

Timedelta methods:

Reshaping and reorganizing

IO / Conversion

Dataset methods

DataArray methods

Coordinates objects

Dataset

DataArray

Plotting

Dataset

DataArray

Faceting

GroupBy objects

Dataset

DataArray

Grouper Objects

Rolling objects

Dataset

DataArray

Coarsen objects

Dataset

DataArray

Exponential rolling objects

Weighted objects

Dataset

DataArray

Resample objects

Dataset

DataArray

Accessors

Custom Indexes

Creating custom indexes

Tutorial

Testing

Hypothesis Testing Strategies

See the documentation page on testing for a guide on how to use these strategies.

Warning

These strategies should be considered highly experimental, and liable to change at any time.

Exceptions

Advanced API

Default, pandas-backed indexes built-in Xarray:

indexes.PandasIndex indexes.PandasMultiIndex

These backends provide a low-level interface for lazily loading data from external file-formats or protocols, and can be manually invoked to create arguments for the load_store and dump_to_store Dataset methods:

These BackendEntrypoints provide a basic interface to the most commonly used filetypes in the xarray universe.

Deprecated / Pending Deprecation