Skip to content
11 changes: 11 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -8942,6 +8942,17 @@ def aggregate(self, func=None, axis: Axis = 0, *args, **kwargs):

agg = aggregate

@doc(NDFrame.any, **_shared_doc_kwargs)
def any(
self: DataFrame,
axis: Axis = 0,
bool_only: bool | None = None,
skipna: bool = True,
level: Level | None = None,
**kwargs,
) -> DataFrame | Series:
...

@doc(
_shared_docs["transform"],
klass=_shared_doc_kwargs["klass"],
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10517,7 +10517,7 @@ def any(
skipna: bool_t = True,
level: Level | None = None,
**kwargs,
) -> Series | bool_t:
) -> DataFrame | Series | bool_t:
return self._logical_func(
"any", nanops.nanany, axis, bool_only, skipna, level, **kwargs
)
Expand Down
11 changes: 11 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -4397,6 +4397,17 @@ def aggregate(self, func=None, axis=0, *args, **kwargs):

agg = aggregate

@doc(NDFrame.any, **_shared_doc_kwargs)
def any(
self: Series,
axis: Axis = 0,
bool_only: bool | None = None,
skipna: bool = True,
level: Level | None = None,
**kwargs,
) -> Series | bool:
...

@doc(
_shared_docs["transform"],
klass=_shared_doc_kwargs["klass"],
Expand Down