Skip to content

Commit 512946e

Browse files
Add swap_coords to relevant 'See also' sections
1 parent 0f70a87 commit 512946e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

xarray/core/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ def assign_coords(self, **kwargs):
344344
See also
345345
--------
346346
Dataset.assign
347+
Dataset.swap_coords
347348
"""
348349
data = self.copy(deep=False)
349350
results = self._calc_assign_results(kwargs)

xarray/core/dataset.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,10 @@ def set_coords(self, names, inplace=False):
11121112
Returns
11131113
-------
11141114
Dataset
1115+
1116+
See also
1117+
--------
1118+
Dataset.swap_coords
11151119
"""
11161120
# TODO: allow inserting new coordinates with this method, like
11171121
# DataFrame.set_index?
@@ -2297,6 +2301,7 @@ def set_index(self, indexes=None, append=False, inplace=False,
22972301
See Also
22982302
--------
22992303
Dataset.reset_index
2304+
Dataset.swap_coords
23002305
"""
23012306
indexes = either_dict_or_kwargs(indexes, indexes_kwargs, 'set_index')
23022307
variables, coord_names = merge_indexes(indexes, self._variables,

xarray/core/groupby.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ def assign_coords(self, **kwargs):
423423
See also
424424
--------
425425
Dataset.assign_coords
426+
Dataset.swap_coords
426427
"""
427428
return self.apply(lambda ds: ds.assign_coords(**kwargs))
428429

0 commit comments

Comments
 (0)