Skip to content

Commit 97c70cf

Browse files
authored
make clearer that sortby() do not run inplace (#7226)
1 parent ca57e5c commit 97c70cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xarray/core/dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6933,7 +6933,8 @@ def sortby(
69336933
... },
69346934
... coords={"x": ["b", "a"], "y": [1, 0]},
69356935
... )
6936-
>>> ds.sortby("x")
6936+
>>> ds = ds.sortby("x")
6937+
>>> ds
69376938
<xarray.Dataset>
69386939
Dimensions: (x: 2, y: 2)
69396940
Coordinates:

0 commit comments

Comments
 (0)