File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -7929,6 +7929,7 @@ def to_series(right):
7929
7929
)
7930
7930
elif isinstance (right , Series ):
7931
7931
# axis=1 is default for DataFrame-with-Series op
7932
+ axis = axis if axis is not None else 1
7932
7933
if not flex :
7933
7934
if not left .axes [axis ].equals (right .index ):
7934
7935
raise ValueError (
Original file line number Diff line number Diff line change @@ -177,3 +177,14 @@ def test_clip_int_data_with_float_bound(self):
177
177
result = df .clip (lower = 1.5 )
178
178
expected = DataFrame ({"a" : [1.5 , 2.0 , 3.0 ]})
179
179
tm .assert_frame_equal (result , expected )
180
+
181
+ def test_clip_with_list_bound (self ):
182
+ # GH#54817
183
+ df = DataFrame ([1 , 5 ])
184
+ expected = DataFrame ([3 , 5 ])
185
+ result = df .clip ([3 ])
186
+ tm .assert_frame_equal (result , expected )
187
+
188
+ expected = DataFrame ([1 , 3 ])
189
+ result = df .clip (upper = [3 ])
190
+ tm .assert_frame_equal (result , expected )
You can’t perform that action at this time.
0 commit comments