MCPcopy
hub / github.com/pydata/xarray / Dataset

Class Dataset

xarray/core/dataset.py:202–10619  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

200
201
202class 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}

Callers 15

__init__Method · 0.90
setupMethod · 0.90
setupMethod · 0.90
scatter_example_datasetFunction · 0.90
decode_cfFunction · 0.90
make_metaFunction · 0.90
map_blocksFunction · 0.90
_to_new_datasetFunction · 0.90
mapMethod · 0.90
from_dictMethod · 0.90
mergeMethod · 0.90
full_likeFunction · 0.90

Calls

no outgoing calls

Tested by 15

__init__Method · 0.72
test_colorbar_scatterMethod · 0.72
setUpMethod · 0.72
setUpMethod · 0.72
setUpMethod · 0.72
test_lazy_datasetMethod · 0.72
test_dataset_reprMethod · 0.72
test_dataset_pickleMethod · 0.72
test_dataset_getattrMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…