Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: update pandas.DataFrame.head docstring #20262

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
--------
Expand Down Expand Up @@ -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
Expand Down