xray.Dataset.isel¶
- Dataset.isel(**indexers)¶
Returns a new dataset with each array indexed along the specified dimension(s).
This method selects values from each array using its __getitem__ method, except this method does not require knowing the order of each array’s dimensions.
Parameters: **indexers : {dim: indexer, ...}
Keyword arguments with names matching dimensions and values given by integers, slice objects or arrays.
Returns: obj : Dataset
A new Dataset with the same contents as this dataset, except each array and dimension is indexed by the appropriate indexers. In general, each array’s data will be a view of the array’s data in this dataset, unless numpy fancy indexing was triggered by using an array indexer, in which case the data will be a copy.