From 0a982ee1f5952ff1cdc381f9239d06537ebe0fa2 Mon Sep 17 00:00:00 2001 From: Cheuk Ho Date: Fri, 15 Dec 2017 12:56:12 +0000 Subject: [PATCH] DOC: Adding example and See also to head and tail method (#16416) --- pandas/core/generic.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 1d147f93d1e46b..8bca449602408d 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -3585,6 +3585,7 @@ def head(self, n=5): 8 zebra Viewing the first 5 lines + >>> df.head() animal 0 alligator @@ -3594,6 +3595,7 @@ def head(self, n=5): 4 monkey Viewing the first n lines (three in this case) + >>> df.head(3) animal 0 alligator @@ -3638,6 +3640,7 @@ def tail(self, n=5): 8 zebra Viewing the last 5 lines + >>> df.tail() animal 4 monkey @@ -3647,6 +3650,7 @@ def tail(self, n=5): 8 zebra Viewing the last n lines (three in this case) + >>> df.tail(3) animal 6 shark