diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 397726181d2fb..f25d2d5164a84 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -3607,8 +3607,8 @@ def head(self, n=5): """ Return the first `n` rows. - This function returns the first `n` rows for the object based on the - underlying index. It is useful for quickly testing if your object + This function returns the first `n` rows for the object based + on position. It is useful for quickly testing if your object has the right type of data in it. Parameters @@ -3619,7 +3619,7 @@ def head(self, n=5): Returns ------- obj_head : type of caller - The first n rows of the caller object. + The first `n` rows of the caller object. See Also -------- @@ -3651,7 +3651,7 @@ def head(self, n=5): 3 lion 4 monkey - Viewing the first n lines (three in this case) + Viewing the first `n` lines (three in this case) >>> df.head(3) animal