diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 9f2112729a503..435915ef4d174 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -3605,7 +3605,11 @@ def f(x): def head(self, n=5): """ - Return the first n rows. + 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 + has the right type of data in it. Parameters ---------- @@ -3619,7 +3623,7 @@ def head(self, n=5): See Also -------- - pandas.DataFrame.tail + pandas.DataFrame.tail: Returns the last `n` rows. Examples --------