Skip to content

Commit feefca8

Browse files
DOC: fix See Also constructs (#26059)
1 parent 835d6f0 commit feefca8

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pandas/core/groupby/groupby.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,8 @@ def count(self):
10971097
# defined here for API doc
10981098
raise NotImplementedError
10991099

1100-
@Substitution(name='groupby', see_also=_common_see_also)
1100+
@Substitution(name='groupby')
1101+
@Substitution(see_also=_common_see_also)
11011102
def mean(self, *args, **kwargs):
11021103
"""
11031104
Compute mean of groups, excluding missing values.
@@ -1543,7 +1544,8 @@ def backfill(self, limit=None):
15431544
return self._fill('bfill', limit=limit)
15441545
bfill = backfill
15451546

1546-
@Substitution(name='groupby', see_also=_common_see_also)
1547+
@Substitution(name='groupby')
1548+
@Substitution(see_also=_common_see_also)
15471549
def nth(self, n, dropna=None):
15481550
"""
15491551
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,
21302132
shifted = fill_grp.shift(periods=periods, freq=freq)
21312133
return (filled / shifted) - 1
21322134

2133-
@Substitution(name='groupby', see_also=_common_see_also)
2135+
@Substitution(name='groupby')
2136+
@Substitution(see_also=_common_see_also)
21342137
def head(self, n=5):
21352138
"""
21362139
Return first n rows of each group.
@@ -2156,7 +2159,8 @@ def head(self, n=5):
21562159
mask = self._cumcount_array() < n
21572160
return self._selected_obj[mask]
21582161

2159-
@Substitution(name='groupby', see_also=_common_see_also)
2162+
@Substitution(name='groupby')
2163+
@Substitution(see_also=_common_see_also)
21602164
def tail(self, n=5):
21612165
"""
21622166
Return last n rows of each group.

pandas/core/indexes/base.py

-2
Original file line numberDiff line numberDiff line change
@@ -3624,8 +3624,6 @@ def values(self):
36243624
--------
36253625
Index.array : Reference to the underlying data.
36263626
Index.to_numpy : A NumPy array representing the underlying data.
3627-
3628-
Return the underlying data as an ndarray.
36293627
"""
36303628
return self._data.view(np.ndarray)
36313629

0 commit comments

Comments
 (0)