Skip to content

Commit 1c88435

Browse files
albaniemroeschke
andauthored
DOC: Minor fix to docstring formatting for head() and tail() (#58589)
* Minor fix to docstring formatting Fix minor inconsistency in docstring formatting for `head()` and `tail()`. Fix the code formatting for the `n` variable appearing in the docstrings of `head()` and `tail()` so that it is consistent with surrounding uses of the variable. * Update pandas/core/generic.py --------- Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 627eac8 commit 1c88435

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5527,7 +5527,7 @@ def head(self, n: int = 5) -> Self:
55275527
it returns an empty object. When ``n`` is negative, it returns
55285528
all rows except the last ``|n|`` rows, mirroring the behavior of ``df[:n]``.
55295529
5530-
If n is larger than the number of rows, this function returns all rows.
5530+
If ``n`` is larger than the number of rows, this function returns all rows.
55315531
55325532
Parameters
55335533
----------
@@ -5615,7 +5615,7 @@ def tail(self, n: int = 5) -> Self:
56155615
For negative values of `n`, this function returns all rows except
56165616
the first `|n|` rows, equivalent to ``df[|n|:]``.
56175617
5618-
If n is larger than the number of rows, this function returns all rows.
5618+
If ``n`` is larger than the number of rows, this function returns all rows.
56195619
56205620
Parameters
56215621
----------

0 commit comments

Comments
 (0)