Skip to content

Commit fbebc7f

Browse files
thismakessandjorisvandenbossche
authored andcommitted
DOC: Update pandas.DataFrame.tail docstring (#20225)
1 parent c2864d7 commit fbebc7f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/core/generic.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,11 @@ def head(self, n=5):
36643664

36653665
def tail(self, n=5):
36663666
"""
3667-
Return the last n rows.
3667+
Return the last `n` rows.
3668+
3669+
This function returns last `n` rows from the object based on
3670+
position. It is useful for quickly verifying data, for example,
3671+
after sorting or appending rows.
36683672
36693673
Parameters
36703674
----------
@@ -3706,7 +3710,7 @@ def tail(self, n=5):
37063710
7 whale
37073711
8 zebra
37083712
3709-
Viewing the last n lines (three in this case)
3713+
Viewing the last `n` lines (three in this case)
37103714
37113715
>>> df.tail(3)
37123716
animal

0 commit comments

Comments
 (0)