Skip to content
Merged
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
36 changes: 36 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8607,6 +8607,42 @@ def _clip_with_one_bound(self, threshold, method, axis, inplace):
# GH 40420
return self.where(subset, threshold, axis=axis, inplace=inplace)

@overload
def clip(
self,
lower=...,
upper=...,
*,
axis: Axis | None = ...,
inplace: Literal[False] = ...,
**kwargs,
) -> Self:
...

@overload
def clip(
self,
lower=...,
upper=...,
*,
axis: Axis | None = ...,
inplace: Literal[True],
**kwargs,
) -> None:
...

@overload
def clip(
self,
lower=...,
upper=...,
*,
axis: Axis | None = ...,
inplace: bool_t = ...,
**kwargs,
) -> Self | None:
...

@final
def clip(
self,
Expand Down