diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 50a93994dc76b..932344ae91eab 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -11494,7 +11494,7 @@ def any( **kwargs, ) -> Series | bool: ... - @doc(make_doc("any", ndim=2)) + @doc(make_doc("any", ndim=1)) def any( self, *, @@ -11540,7 +11540,7 @@ def all( **kwargs, ) -> Series | bool: ... - @doc(make_doc("all", ndim=2)) + @doc(make_doc("all", ndim=1)) def all( self, axis: Axis | None = 0, diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 858d2ba82a969..4b5a3b5ffdb40 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -11881,9 +11881,9 @@ def last_valid_index(self) -> Hashable: Returns ------- -{name1} or {name2} - If level is specified, then, {name2} is returned; otherwise, {name1} - is returned. +{name2} or {name1} + If axis=None, then a scalar boolean is returned. + Otherwise a Series is returned with index matching the index argument. {see_also} {examples}"""