Skip to content

Commit

Permalink
[Documentation] Added another example in df.clip documentation. (#5…
Browse files Browse the repository at this point in the history
…5589)

* Update generic.py

* Update generic.py

* Update generic.py
  • Loading branch information
abhi-glitchhg authored Oct 20, 2023
1 parent 52cdc34 commit af5fa36
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8785,6 +8785,16 @@ def clip(
3 -1 6
4 5 -4
Clips using specific lower and upper thresholds per column:
>>> df.clip([-2, -1], [4,5])
col_0 col_1
0 4 -1
1 -2 -1
2 0 5
3 -1 5
4 4 -1
Clips using specific lower and upper thresholds per column element:
>>> t = pd.Series([2, -4, -1, 6, 3])
Expand Down

0 comments on commit af5fa36

Please sign in to comment.