We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://tutorial.xarray.dev/fundamentals/02.1_indexing_Basic.html#indexing-with-a-datetimeindex-or-date-string-list
dates = ['2013-07-09', '2013-10-11', '2013-12-24'] ds.sel(time=dates)
File ~/miniforge3/envs/xarray-tutorial-v1/lib/python3.12/site-packages/xarray/core/dataset.py:3126, in Dataset.sel(self, indexers, method, tolerance, drop, **indexers_kwargs) 3058 """Returns a new dataset with each array indexed by tick labels 3059 along the specified dimension(s). 3060 (...) 3123 3124 """ 3125 indexers = either_dict_or_kwargs(indexers, indexers_kwargs, "sel") -> 3126 query_results = map_index_queries( 3127 self, indexers=indexers, method=method, tolerance=tolerance 3128 ) 3130 if drop: 3131 no_scalar_variables = {} File ~/miniforge3/envs/xarray-tutorial-v1/lib/python3.12/site-packages/xarray/core/indexing.py:192, in map_index_queries(obj, indexers, method, tolerance, **indexers_kwargs) 190 results.append(IndexSelResult(labels)) 191 else: --> 192 results.append(index.sel(labels, **options)) 194 merged = merge_sel_results(results) 196 # drop dimension coordinates found in dimension indexers 197 # (also drop multi-index if any) 198 # (.sel() already ensures alignment) File ~/miniforge3/envs/xarray-tutorial-v1/lib/python3.12/site-packages/xarray/core/indexes.py:801, in PandasIndex.sel(self, labels, method, tolerance) 799 indexer = get_indexer_nd(self.index, label_array, method, tolerance) 800 if np.any(indexer < 0): --> 801 raise KeyError(f"not all values found in index {coord_name!r}") 803 # attach dimension names and/or coordinates to positional indexer 804 if isinstance(label, Variable): KeyError: "not all values found in index 'time'"
Noticed this bumping to latest package versions (with numpy>=2 in environment)
(#270)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
https://tutorial.xarray.dev/fundamentals/02.1_indexing_Basic.html#indexing-with-a-datetimeindex-or-date-string-list
Noticed this bumping to latest package versions (with numpy>=2 in environment)
(#270)
The text was updated successfully, but these errors were encountered: