From 76432b37598f47e8c975d978a54168fa8d90a90c Mon Sep 17 00:00:00 2001 From: lamprinikourou Date: Sun, 31 Mar 2024 04:09:19 +0300 Subject: [PATCH 1/2] #57088: Changed ndim to 1, modified doc as suggested. --- pandas/core/frame.py | 4 ++-- pandas/core/generic.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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..7b64588652685 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}""" From 72049cc2f7f202a75d0d3a3e95a07daa0717bdcf Mon Sep 17 00:00:00 2001 From: lamprinikourou Date: Sun, 31 Mar 2024 05:03:23 +0300 Subject: [PATCH 2/2] added tab --- pandas/core/generic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 7b64588652685..4b5a3b5ffdb40 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -11882,8 +11882,8 @@ def last_valid_index(self) -> Hashable: Returns ------- {name2} or {name1} -If axis=None, then a scalar boolean is returned. -Otherwise a Series is returned with index matching the index argument. + If axis=None, then a scalar boolean is returned. + Otherwise a Series is returned with index matching the index argument. {see_also} {examples}"""