@@ -1396,16 +1396,11 @@ def test_auto_switch_unsupported_series_groupby(groupby_kwargs):
13961396 series = pd .Series (test_data ).move_to ("Snowflake" )
13971397 assert series .get_backend () == "Snowflake"
13981398
1399- # Convert list to Snowpark pandas Series in groupby_kwargs
1400- converted_kwargs = groupby_kwargs .copy ()
1401- if "by" in converted_kwargs and isinstance (converted_kwargs ["by" ], list ):
1402- converted_kwargs ["by" ] = pd .Series (converted_kwargs ["by" ])
1403-
14041399 _test_stay_cost (
14051400 data_obj = series ,
14061401 api_cls_name = "Series" ,
14071402 method_name = "groupby" ,
1408- args = converted_kwargs ,
1403+ args = groupby_kwargs ,
14091404 expected_cost = QCCoercionCost .COST_IMPOSSIBLE ,
14101405 )
14111406
@@ -1414,11 +1409,11 @@ def test_auto_switch_unsupported_series_groupby(groupby_kwargs):
14141409 pandas_qc = pandas_series ._query_compiler ,
14151410 api_cls_name = "Series" ,
14161411 method_name = "groupby" ,
1417- args = converted_kwargs ,
1412+ args = groupby_kwargs ,
14181413 expected_cost = QCCoercionCost .COST_IMPOSSIBLE ,
14191414 )
14201415
1421- groupby_obj = series .groupby (** converted_kwargs )
1416+ groupby_obj = series .groupby (** groupby_kwargs )
14221417 assert groupby_obj .get_backend () == "Pandas"
14231418
14241419
@@ -1470,16 +1465,11 @@ def test_auto_switch_unsupported_series_groupby_with_supported_method(
14701465 series = pd .Series (test_data ).move_to ("Snowflake" )
14711466 assert series .get_backend () == "Snowflake"
14721467
1473- # Convert list to Snowpark pandas Series in groupby_kwargs
1474- converted_kwargs = groupby_kwargs .copy ()
1475- if "by" in converted_kwargs and isinstance (converted_kwargs ["by" ], list ):
1476- converted_kwargs ["by" ] = pd .Series (converted_kwargs ["by" ])
1477-
14781468 _test_stay_cost (
14791469 data_obj = series ,
14801470 api_cls_name = "Series" ,
14811471 method_name = "groupby" ,
1482- args = converted_kwargs ,
1472+ args = groupby_kwargs ,
14831473 expected_cost = QCCoercionCost .COST_IMPOSSIBLE ,
14841474 )
14851475
@@ -1488,11 +1478,11 @@ def test_auto_switch_unsupported_series_groupby_with_supported_method(
14881478 pandas_qc = pandas_series ._query_compiler ,
14891479 api_cls_name = "Series" ,
14901480 method_name = "groupby" ,
1491- args = converted_kwargs ,
1481+ args = groupby_kwargs ,
14921482 expected_cost = QCCoercionCost .COST_IMPOSSIBLE ,
14931483 )
14941484
1495- groupby_obj = series .groupby (** converted_kwargs )
1485+ groupby_obj = series .groupby (** groupby_kwargs )
14961486 assert groupby_obj .get_backend () == "Pandas"
14971487
14981488 _test_expected_backend (
0 commit comments