Skip to content

Commit f7a9dac

Browse files
authored
updated head and tail docstrings (#46466)
* updated head and tail docstrings * fixed typos
1 parent 5414a2d commit f7a9dac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/generic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5284,6 +5284,8 @@ def head(self: NDFrameT, n: int = 5) -> NDFrameT:
52845284
For negative values of `n`, this function returns all rows except
52855285
the last `n` rows, equivalent to ``df[:-n]``.
52865286
5287+
If n is larger than the number of rows, this function returns all rows.
5288+
52875289
Parameters
52885290
----------
52895291
n : int, default 5
@@ -5357,6 +5359,8 @@ def tail(self: NDFrameT, n: int = 5) -> NDFrameT:
53575359
For negative values of `n`, this function returns all rows except
53585360
the first `n` rows, equivalent to ``df[n:]``.
53595361
5362+
If n is larger than the number of rows, this function returns all rows.
5363+
53605364
Parameters
53615365
----------
53625366
n : int, default 5

0 commit comments

Comments
 (0)