Skip to content

Commit 0a982ee

Browse files
committed
DOC: Adding example and See also to head and tail method (pandas-dev#16416)
1 parent 018aad7 commit 0a982ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/generic.py

+4
Original file line numberDiff line numberDiff line change
@@ -3585,6 +3585,7 @@ def head(self, n=5):
35853585
8 zebra
35863586
35873587
Viewing the first 5 lines
3588+
35883589
>>> df.head()
35893590
animal
35903591
0 alligator
@@ -3594,6 +3595,7 @@ def head(self, n=5):
35943595
4 monkey
35953596
35963597
Viewing the first n lines (three in this case)
3598+
35973599
>>> df.head(3)
35983600
animal
35993601
0 alligator
@@ -3638,6 +3640,7 @@ def tail(self, n=5):
36383640
8 zebra
36393641
36403642
Viewing the last 5 lines
3643+
36413644
>>> df.tail()
36423645
animal
36433646
4 monkey
@@ -3647,6 +3650,7 @@ def tail(self, n=5):
36473650
8 zebra
36483651
36493652
Viewing the last n lines (three in this case)
3653+
36503654
>>> df.tail(3)
36513655
animal
36523656
6 shark

0 commit comments

Comments
 (0)