Backward compatible implementation of ``map`` See Also -------- DataArrayGroupBy.map
(self, func, shortcut=False, args=(), **kwargs)
| 1664 | return self._combine(applied, shortcut=shortcut) |
| 1665 | |
| 1666 | def apply(self, func, shortcut=False, args=(), **kwargs): |
| 1667 | """ |
| 1668 | Backward compatible implementation of ``map`` |
| 1669 | |
| 1670 | See Also |
| 1671 | -------- |
| 1672 | DataArrayGroupBy.map |
| 1673 | """ |
| 1674 | warnings.warn( |
| 1675 | "GroupBy.apply may be deprecated in the future. Using GroupBy.map is encouraged", |
| 1676 | PendingDeprecationWarning, |
| 1677 | stacklevel=2, |
| 1678 | ) |
| 1679 | return self.map(func, shortcut=shortcut, args=args, **kwargs) |
| 1680 | |
| 1681 | def _combine(self, applied, shortcut=False): |
| 1682 | """Recombine the applied objects like the original.""" |