@@ -2990,34 +2990,20 @@ def foo(x: int, y: bool, z: float) -> str:
29902990 scalars_df , scalars_pandas_df = scalars_dfs
29912991
29922992 args1 = (True , 10.0 )
2993- bf_result_col = scalars_df ["int64_too" ].apply (foo , args = args1 )
2994- bf_result = (
2995- scalars_df ["int64_too" ].to_frame ().assign (result = bf_result_col ).to_pandas ()
2996- )
2997-
2998- pd_result_col = scalars_pandas_df ["int64_too" ].apply (foo , args = args1 )
2999- pd_result = (
3000- scalars_pandas_df ["int64_too" ].to_frame ().assign (result = pd_result_col )
3001- )
2993+ bf_result = scalars_df ["int64_too" ].apply (foo , args = args1 ).to_pandas ()
2994+ pd_result = scalars_pandas_df ["int64_too" ].apply (foo , args = args1 )
30022995
30032996 # Ignore any dtype difference.
3004- pandas .testing .assert_frame_equal (bf_result , pd_result , check_dtype = False )
2997+ pandas .testing .assert_series_equal (bf_result , pd_result , check_dtype = False )
30052998
30062999 args2 = (False , - 10.0 )
30073000 foo_ref = session .read_gbq_function (foo .bigframes_bigquery_function )
30083001
3009- bf_result_col = scalars_df ["int64_too" ].apply (foo_ref , args = args2 )
3010- bf_result = (
3011- scalars_df ["int64_too" ].to_frame ().assign (result = bf_result_col ).to_pandas ()
3012- )
3013-
3014- pd_result_col = scalars_pandas_df ["int64_too" ].apply (foo , args = args2 )
3015- pd_result = (
3016- scalars_pandas_df ["int64_too" ].to_frame ().assign (result = pd_result_col )
3017- )
3002+ bf_result = scalars_df ["int64_too" ].apply (foo_ref , args = args2 ).to_pandas ()
3003+ pd_result = scalars_pandas_df ["int64_too" ].apply (foo , args = args2 )
30183004
30193005 # Ignore any dtype difference.
3020- pandas .testing .assert_frame_equal (bf_result , pd_result , check_dtype = False )
3006+ pandas .testing .assert_series_equal (bf_result , pd_result , check_dtype = False )
30213007
30223008 finally :
30233009 # Clean up the gcp assets created for the remote function.
0 commit comments