@@ -2853,11 +2853,8 @@ def clip_upper(self, threshold, axis=None):
2853
2853
if np .any (isnull (threshold )):
2854
2854
raise ValueError ("Cannot use an NA value as a clip threshold" )
2855
2855
2856
- if axis is None :
2857
- return self .where (self .le (threshold ) | isnull (self ), threshold )
2858
- else :
2859
- subset = self .le (threshold , axis = axis ) | isnull (self )
2860
- return self .where (subset , threshold , axis = axis )
2856
+ subset = self .le (threshold , axis = axis ) | isnull (self )
2857
+ return self .where (subset , threshold , axis = axis )
2861
2858
2862
2859
2863
2860
def clip_lower (self , threshold , axis = None ):
@@ -2881,11 +2878,8 @@ def clip_lower(self, threshold, axis=None):
2881
2878
if np .any (isnull (threshold )):
2882
2879
raise ValueError ("Cannot use an NA value as a clip threshold" )
2883
2880
2884
- if axis is None :
2885
- return self .where (self .ge (threshold ) | isnull (self ), threshold )
2886
- else :
2887
- subset = self .ge (threshold , axis = axis ) | isnull (self )
2888
- return self .where (subset , threshold , axis = axis )
2881
+ subset = self .ge (threshold , axis = axis ) | isnull (self )
2882
+ return self .where (subset , threshold , axis = axis )
2889
2883
2890
2884
2891
2885
def groupby (self , by = None , axis = 0 , level = None , as_index = True , sort = True ,
0 commit comments