From c3d491a28e258cce4b9ea8db1f06f776f9fd6e76 Mon Sep 17 00:00:00 2001 From: "Andy R. Terrel" Date: Sat, 10 Mar 2018 11:48:13 -0800 Subject: [PATCH] DOC: update the DataFrame.head() docstring (#20206) --- pandas/core/generic.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index d5bdeb7fe1a4d..397726181d2fb 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 --------