MCPcopy
hub / github.com/pydata/xarray / assign_coords

Method assign_coords

xarray/core/groupby.py:1541–1550  ·  view source on GitHub ↗

Assign coordinates by group. See Also -------- Dataset.assign_coords Dataset.swap_dims

(self, coords=None, **coords_kwargs)

Source from the content-addressed store, hash-verified

1539 return self._first_or_last("last", skipna, keep_attrs)
1540
1541 def assign_coords(self, coords=None, **coords_kwargs):
1542 """Assign coordinates by group.
1543
1544 See Also
1545 --------
1546 Dataset.assign_coords
1547 Dataset.swap_dims
1548 """
1549 coords_kwargs = either_dict_or_kwargs(coords, coords_kwargs, "assign_coords")
1550 return self.map(lambda ds: ds.assign_coords(**coords_kwargs))
1551
1552
1553def _maybe_reorder(xarray_obj, dim, positions, N: int | None):

Callers 15

stack_dataarrayMethod · 0.45
quantileMethod · 0.45
_flox_reduceMethod · 0.45
_combineMethod · 0.45
_combineMethod · 0.45
_weighted_quantileMethod · 0.45
curvefitFunction · 0.45
test_reindexMethod · 0.45

Calls 2

mapMethod · 0.95
either_dict_or_kwargsFunction · 0.90