Skip to content

Absolute value or minus sign missing in docstrings for head and tail #42204

Closed
@olbermann

Description

@olbermann

In the docstrings for the head and tail functions (in pandas/core/generic.py) there is an absolute value or minus sign missing:
e.g. in tail docstring

For negative values of `n`, this function returns all rows except
        the first `n` rows, equivalent to ``df[n:]``.

should read something like

For negative values of `n`, this function returns all rows except
        the first `np.abs(n)` rows, equivalent to ``df[np.abs(n):]``.

or

For negative values of `n`, this function returns all rows except
        the first `-n` rows, equivalent to ``df[-n:]``.

Similarly for head.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions