Skip to content

DOCS: DataFrame.any() and DataFrame.all() documentation specifies the… #57098

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

Closed
wants to merge 2 commits into from
Closed
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: 6 additions & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13081,8 +13081,8 @@ def last_valid_index(self) -> Hashable | None:
Returns
-------
{name1} or {name2}
If level is specified, then, {name2} is returned; otherwise, {name1}
is returned.
If axis=None, then a {name2} boolean is returned. Otherwise a Series is
returned with index matching the index argument.

{see_also}
{examples}"""
Expand Down Expand Up @@ -13643,12 +13643,16 @@ def make_doc(name: str, ndim: int) -> str:
axis_descr = "{index (0), columns (1)}"

if name == "any":
name1 = "DataFrame"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't be true for Series.any/all

name2 = "scalar"
base_doc = _bool_doc
desc = _any_desc
see_also = _any_see_also
examples = _any_examples
kwargs = {"empty_value": "False"}
elif name == "all":
name1 = "DataFrame"
name2 = "scalar"
base_doc = _bool_doc
desc = _all_desc
see_also = _all_see_also
Expand Down