Skip to content

Commit c3d491a

Browse files
aterreljorisvandenbossche
authored andcommitted
DOC: update the DataFrame.head() docstring (#20206)
1 parent dd7f567 commit c3d491a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: pandas/core/generic.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -3605,7 +3605,11 @@ def f(x):
36053605

36063606
def head(self, n=5):
36073607
"""
3608-
Return the first n rows.
3608+
Return the first `n` rows.
3609+
3610+
This function returns the first `n` rows for the object based on the
3611+
underlying index. It is useful for quickly testing if your object
3612+
has the right type of data in it.
36093613
36103614
Parameters
36113615
----------
@@ -3619,7 +3623,7 @@ def head(self, n=5):
36193623
36203624
See Also
36213625
--------
3622-
pandas.DataFrame.tail
3626+
pandas.DataFrame.tail: Returns the last `n` rows.
36233627
36243628
Examples
36253629
--------

0 commit comments

Comments
 (0)