@@ -1044,26 +1044,22 @@ def test_sum_bools(self):
10441044 assert bools .sum (axis = 1 )[0 ] == 10
10451045
10461046 @pytest .mark .parametrize (
1047- "df, expected " ,
1047+ "input_data, expected_data " ,
10481048 [
1049+ ({"a" : ["483" , "3" ], "b" : ["94" , "759" ]}, ["48394" , "3759" ]),
10491050 (
1050- DataFrame ({"a" : ["483" , "3" ], "b" : ["94" , "759" ]}),
1051- Series (["48394" , "3759" ]),
1052- ),
1053- (
1054- DataFrame ({"a" : ["483.948" , "3.0" ], "b" : ["94.2" , "759.93" ]}),
1055- Series (["483.94894.2" , "3.0759.93" ]),
1056- ),
1057- (
1058- DataFrame ({"a" : ["483" , "3.0" ], "b" : ["94.2" , "79" ]}),
1059- Series (["48394.2" , "3.079" ]),
1051+ {"a" : ["483.948" , "3.0" ], "b" : ["94.2" , "759.93" ]},
1052+ ["483.94894.2" , "3.0759.93" ],
10601053 ),
1054+ ({"a" : ["483" , "3.0" ], "b" : ["94.2" , "79" ]}, ["48394.2" , "3.079" ]),
10611055 ],
10621056 )
1063- def test_sum_string_dtype_coercion (self , df , expected ):
1057+ def test_sum_string_dtype_coercion (self , input_data , expected_data ):
10641058 # GH#22642
10651059 # Check that summing numeric strings results in concatenation
10661060 # and not conversion to dtype int64 or float64
1061+ df = DataFrame (input_data )
1062+ expected = Series (expected_data )
10671063 result = df .sum (axis = 1 )
10681064 tm .assert_series_equal (result , expected )
10691065
0 commit comments