A multi-dimensional, in memory, array database. A dataset resembles an in-memory representation of a NetCDF file, and consists of variables, coordinates and attributes which together form a self describing dataset. Dataset implements the mapping interface with keys given by variabl
| 200 | |
| 201 | |
| 202 | class Dataset( |
| 203 | DataWithCoords, |
| 204 | DatasetAggregations, |
| 205 | DatasetArithmetic, |
| 206 | Mapping[Hashable, "DataArray"], |
| 207 | ): |
| 208 | """A multi-dimensional, in memory, array database. |
| 209 | |
| 210 | A dataset resembles an in-memory representation of a NetCDF file, |
| 211 | and consists of variables, coordinates and attributes which |
| 212 | together form a self describing dataset. |
| 213 | |
| 214 | Dataset implements the mapping interface with keys given by variable |
| 215 | names and values given by DataArray objects for each variable name. |
| 216 | |
| 217 | By default, pandas indexes are created for one dimensional variables with |
| 218 | name equal to their dimension (i.e., :term:`Dimension coordinate`) so those |
| 219 | variables can be readily used as coordinates for label based indexing. When a |
| 220 | :py:class:`~xarray.Coordinates` object is passed to ``coords``, any existing |
| 221 | index(es) built from those coordinates will be added to the Dataset. |
| 222 | |
| 223 | To load data from a file or file-like object, use the `open_dataset` |
| 224 | function. |
| 225 | |
| 226 | Parameters |
| 227 | ---------- |
| 228 | data_vars : dict-like, optional |
| 229 | A mapping from variable names to :py:class:`~xarray.DataArray` |
| 230 | objects, :py:class:`~xarray.Variable` objects or to tuples of |
| 231 | the form ``(dims, data[, attrs])`` which can be used as |
| 232 | arguments to create a new ``Variable``. Each dimension must |
| 233 | have the same length in all variables in which it appears. |
| 234 | |
| 235 | The following notations are accepted: |
| 236 | |
| 237 | - mapping {var name: DataArray} |
| 238 | - mapping {var name: Variable} |
| 239 | - mapping {var name: (dimension name, array-like)} |
| 240 | - mapping {var name: (tuple of dimension names, array-like)} |
| 241 | - mapping {dimension name: array-like} |
| 242 | (if array-like is not a scalar it will be automatically moved to coords, |
| 243 | see below) |
| 244 | |
| 245 | Each dimension must have the same length in all variables in |
| 246 | which it appears. |
| 247 | coords : :py:class:`~xarray.Coordinates` or dict-like, optional |
| 248 | A :py:class:`~xarray.Coordinates` object or another mapping in |
| 249 | similar form as the `data_vars` argument, except that each item |
| 250 | is saved on the dataset as a "coordinate". |
| 251 | These variables have an associated meaning: they describe |
| 252 | constant/fixed/independent quantities, unlike the |
| 253 | varying/measured/dependent quantities that belong in |
| 254 | `variables`. |
| 255 | |
| 256 | The following notations are accepted for arbitrary mappings: |
| 257 | |
| 258 | - mapping {coord name: DataArray} |
| 259 | - mapping {coord name: Variable} |
no outgoing calls
searching dependent graphs…