1from pandas import Series 2import pandas._testing as tm 3 4 5class TestCombine: 6 def test_combine_scalar(self): 7 # GH#21248 8 # Note - combine() with another Series is tested elsewhere because 9 # it is used when testing operators 10 ser = Series([i * 10 for i in range(5)]) 11 result = ser.combine(3, lambda x, y: x + y) 12 expected = Series([i * 10 + 3 for i in range(5)]) 13 tm.assert_series_equal(result, expected) 14 15 result = ser.combine(22, lambda x, y: min(x, y)) 16 expected = Series([min(i * 10, 22) for i in range(5)]) 17 tm.assert_series_equal(result, expected) 18