File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 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):
79297929 )
79307930 elif isinstance (right , Series ):
79317931 # axis=1 is default for DataFrame-with-Series op
7932+ axis = axis if axis is not None else 1
79327933 if not flex :
79337934 if not left .axes [axis ].equals (right .index ):
79347935 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):
177177 result = df .clip (lower = 1.5 )
178178 expected = DataFrame ({"a" : [1.5 , 2.0 , 3.0 ]})
179179 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