Skip to content

Commit

Permalink
Suggest .drop_vars rather than .drop (pydata#6460)
Browse files Browse the repository at this point in the history
Small tweak since I just saw this error message
  • Loading branch information
max-sixty authored Apr 9, 2022
1 parent 8389fe6 commit 24d9f3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/user-guide/plotting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Finally, if a dataset does not have any coordinates it enumerates all data point
.. ipython:: python
:okwarning:
air1d_multi = air1d_multi.drop(["date", "time", "decimal_day"])
air1d_multi = air1d_multi.drop_vars(["date", "time", "decimal_day"])
air1d_multi.plot()
The same applies to 2D plots below.
Expand Down
2 changes: 1 addition & 1 deletion xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ def _validate_region(ds, region):
f"{list(region.keys())}, but that is not "
f"the case for some variables here. To drop these variables "
f"from this dataset before exporting to zarr, write: "
f".drop({non_matching_vars!r})"
f".drop_vars({non_matching_vars!r})"
)


Expand Down

0 comments on commit 24d9f3e

Please sign in to comment.