diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 2494cf55d2e0d..92cb4db2ac868 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -1097,7 +1097,8 @@ def count(self): # defined here for API doc raise NotImplementedError - @Substitution(name='groupby', see_also=_common_see_also) + @Substitution(name='groupby') + @Substitution(see_also=_common_see_also) def mean(self, *args, **kwargs): """ Compute mean of groups, excluding missing values. @@ -1543,7 +1544,8 @@ def backfill(self, limit=None): return self._fill('bfill', limit=limit) bfill = backfill - @Substitution(name='groupby', see_also=_common_see_also) + @Substitution(name='groupby') + @Substitution(see_also=_common_see_also) def nth(self, n, dropna=None): """ Take the nth row from each group if n is an int, or a subset of rows @@ -2130,7 +2132,8 @@ def pct_change(self, periods=1, fill_method='pad', limit=None, freq=None, shifted = fill_grp.shift(periods=periods, freq=freq) return (filled / shifted) - 1 - @Substitution(name='groupby', see_also=_common_see_also) + @Substitution(name='groupby') + @Substitution(see_also=_common_see_also) def head(self, n=5): """ Return first n rows of each group. @@ -2156,7 +2159,8 @@ def head(self, n=5): mask = self._cumcount_array() < n return self._selected_obj[mask] - @Substitution(name='groupby', see_also=_common_see_also) + @Substitution(name='groupby') + @Substitution(see_also=_common_see_also) def tail(self, n=5): """ Return last n rows of each group. diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 1875976a8f931..1b7a0b14b6dbc 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -3624,8 +3624,6 @@ def values(self): -------- Index.array : Reference to the underlying data. Index.to_numpy : A NumPy array representing the underlying data. - - Return the underlying data as an ndarray. """ return self._data.view(np.ndarray)