Dataset#
|
A multi-dimensional, in memory, array database. |
Attributes#
Mapping from dimension names to lengths. |
|
Mapping from dimension names to lengths. |
|
Mapping from data variable names to dtypes. |
|
Dictionary of DataArray objects corresponding to data variables |
|
Mapping of |
|
Dictionary of global attributes on this dataset |
|
Dictionary of global encoding attributes on this dataset |
|
Mapping of pandas.Index objects used for label based indexing. |
|
Mapping of |
|
Mapping from dimension names to block lengths for this dataset's data. |
|
Mapping from dimension names to block lengths for this dataset's data. |
|
Total bytes consumed by the data arrays of all variables in this dataset. |
Dictionary interface#
Datasets implement the mapping interface with keys given by variable names
and values given by DataArray
objects.
|
Access variables or coordinates of this dataset as a |
|
Add an array to this dataset. |
|
Remove a variable from this dataset. |
|
Update this dataset's variables with those from another dataset. |
|
|
Dataset contents#
|
Returns a copy of this dataset. |
|
Assign new data variables to a Dataset, returning a new object with all the original variables in addition to the new ones. |
|
Assign new coordinates to this object. |
|
Assign new attrs to this object. |
|
Apply |
|
Merge the arrays of two datasets into a single dataset. |
|
Returns a new object with renamed variables, coordinates and dimensions. |
|
Returns a new object with renamed variables including coordinates |
|
Returns a new object with renamed dimensions only. |
|
Returns a new object with swapped dimensions. |
|
Return a new object with an additional axis (or axes) inserted at the corresponding position in the array shape. |
|
Drop variables from this dataset. |
|
Drop the indexes assigned to the given coordinates. |
|
Returns a new Dataset with duplicate dimension values removed. |
|
Drop dimensions and associated variables from this dataset. |
Return a new Dataset without encoding on the dataset or any of its variables/coords. |
|
|
Removes all attributes from the Dataset and its variables. |
|
Given names of one or more variables, set them as coordinates |
|
Given names of coordinates, reset them to become variables |
|
Convert the Dataset to another calendar. |
|
Interpolates the Dataset to another calendar based on decimal year measure. |
|
Get an index for a dimension, with fall-back to a default RangeIndex |
Comparisons#
|
Two Datasets are equal if they have matching variables and coordinates, all of which are equal. |
|
Like equals, but also checks all dataset attributes and the attributes on all variables and coordinates. |
|
Two Datasets are broadcast equal if they are equal after broadcasting all variables against each other. |
Indexing#
Attribute for location based indexing. |
|
|
Returns a new dataset with each array indexed along the specified dimension(s). |
|
Returns a new dataset with each array indexed by tick labels along the specified dimension(s). |
|
Drop index labels from this dataset. |
|
Drop index positions from this Dataset. |
|
Returns a new dataset with the first n values of each array for the specified dimension(s). |
|
Returns a new dataset with the last n values of each array for the specified dimension(s). |
|
Returns a new dataset with each array indexed along every n-th value for the specified dimension(s) |
|
Return a new object with squeezed data. |
|
Interpolate a Dataset onto new coordinates. |
|
Interpolate this object onto the coordinates of another object. |
|
Conform this object onto a new set of indexes, filling in missing values with |
|
Conform this object onto the indexes of another object, for indexes which the objects share. |
|
Set Dataset (multi-)indexes using one or more existing coordinates or variables. |
|
Reset the specified index(es) or multi-index level(s). |
|
Set a new, Xarray-compatible index from one or more existing coordinate(s). |
|
Rearrange index levels using input order. |
|
Return a new dataset with each array indexed along the specified dimension(s), where the indexers are given as strings containing Python expressions to be evaluated against the data variables in the dataset. |
Missing value handling#
|
Test each value in the array for whether it is a missing value. |
|
Test each value in the array for whether it is not a missing value. |
|
Combine two Datasets, default to data_vars of self. |
|
Reduce this Dataset's data by applying |
|
Returns a new dataset with dropped labels for missing values along the provided dimension. |
|
Fill missing values in this object. |
|
Fill NaN values by propagating values forward |
|
Fill NaN values by propagating values backward |
|
Fill in NaNs by interpolating according to different methods. |
|
Filter elements from this object according to a condition. |
|
Tests each value in the array for whether it is in test elements. |
Computation#
|
Apply a function to each data variable in this dataset |
|
Reduce this dataset by applying func along some dimension(s). |
|
Returns a DatasetGroupBy object for performing grouped operations. |
|
Returns a DatasetGroupBy object for performing grouped operations. |
|
Rolling window object for Datasets. |
|
Exponentially-weighted moving window. |
|
Accumulating object for Datasets |
|
Weighted Dataset operations. |
|
Coarsen object for Datasets. |
|
Returns a Resample object for performing resampling operations. |
|
Calculate the n-th order discrete difference along given axis. |
|
Compute the qth quantile of the data along the specified dimension. |
|
Differentiate with the second order accurate central differences. |
|
Integrate along the given coordinate using the trapezoidal rule. |
|
Apply a function to each block of this Dataset. |
|
Least squares polynomial fit. |
|
Curve fitting optimization for arbitrary functions. |
|
Calculate an expression supplied as a string in the context of the dataset. |
Aggregation#
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Indices of the maxima of the member variables. |
|
Indices of the minima of the member variables. |
|
Reduce this Dataset's data by applying |
|
Return the coordinate label of the maximum value along a dimension. |
|
Return the coordinate label of the minimum value along a dimension. |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
|
Reduce this Dataset's data by applying |
ndarray methods#
|
Returns the indices that would sort this array. |
|
Copy of the xarray object, with data cast to a specified type. |
|
Return an array whose values are limited to |
Complex-conjugate all elements. |
|
|
a.conj() |
The imaginary part of each data variable. |
|
|
|
The real part of each data variable. |
|
|
Ranks the data. |
Reshaping and reorganizing#
|
Return a new Dataset object with all array dimensions transposed. |
|
Stack any number of existing dimensions into a single new dimension. |
|
Unstack existing dimensions corresponding to MultiIndexes into multiple new dimensions. |
|
Combine variables of differing dimensionality into a DataArray without broadcasting. |
|
Shift this dataset by an offset along one or more dimensions. |
|
Roll this dataset by an offset along one or more dimensions. |
|
Pad this dataset along one or more dimensions. |
|
Sort object by labels or values (along an axis). |
|
Broadcast this DataArray against another Dataset or DataArray. |