@@ -6572,7 +6572,10 @@ def clip_upper(self, threshold, axis=None, inplace=False):
6572
6572
6573
6573
def clip_lower (self , threshold , axis = None , inplace = False ):
6574
6574
"""
6575
- Return copy of the input with values below a threshold truncated.
6575
+ Trim values below a given threshold.
6576
+
6577
+ Elements below the `threshold` will be changed to match the
6578
+ `threshold` value(s).
6576
6579
6577
6580
Parameters
6578
6581
----------
@@ -6597,17 +6600,22 @@ def clip_lower(self, threshold, axis=None, inplace=False):
6597
6600
6598
6601
See Also
6599
6602
--------
6600
- Series.clip : Return copy of input with values below and above
6601
- thresholds truncated.
6602
- Series.clip_upper : Return copy of input with values above
6603
- threshold truncated.
6603
+ DataFrame.clip : General purpose method to trim `DataFrame` values to
6604
+ given threshold(s)
6605
+ DataFrame.clip_upper : Trim `DataFrame` values above given
6606
+ threshold(s)
6607
+ Series.clip : General purpose method to trim `Series` values to given
6608
+ threshold(s)
6609
+ Series.clip_upper : Trim `Series` values above given threshold(s)
6604
6610
6605
6611
Returns
6606
6612
-------
6607
- clipped : same type as input
6613
+ clipped
6614
+ Original data with values trimmed.
6608
6615
6609
6616
Examples
6610
6617
--------
6618
+
6611
6619
Series single threshold clipping:
6612
6620
6613
6621
>>> s = pd.Series([5, 6, 7, 8, 9])
@@ -6659,17 +6667,18 @@ def clip_lower(self, threshold, axis=None, inplace=False):
6659
6667
`threshold` should be the same length as the axis specified by
6660
6668
`axis`.
6661
6669
6662
- >>> df.clip_lower(np.array( [3, 3, 5]) , axis='index')
6670
+ >>> df.clip_lower([3, 3, 5], axis='index')
6663
6671
A B
6664
6672
0 3 3
6665
6673
1 3 4
6666
6674
2 5 6
6667
6675
6668
- >>> df.clip_lower(np.array( [4, 5]) , axis='columns')
6676
+ >>> df.clip_lower([4, 5], axis='columns')
6669
6677
A B
6670
6678
0 4 5
6671
6679
1 4 5
6672
6680
2 5 6
6681
+
6673
6682
"""
6674
6683
return self ._clip_with_one_bound (threshold , method = self .ge ,
6675
6684
axis = axis , inplace = inplace )
0 commit comments