@@ -4285,13 +4285,16 @@ def test_apply_lambda(scalars_dfs, col, lambda_):
4285
4285
bf_result = bf_col .apply (lambda_ , by_row = False ).to_pandas ()
4286
4286
4287
4287
pd_col = scalars_pandas_df [col ]
4288
- if pd .__version__ . startswith ("2.2" ):
4288
+ if pd .__version__ [: 3 ] in ("2.2" , "2.3 " ):
4289
4289
pd_result = pd_col .apply (lambda_ , by_row = False )
4290
4290
else :
4291
4291
pd_result = pd_col .apply (lambda_ )
4292
4292
4293
4293
# ignore dtype check, which are Int64 and object respectively
4294
- assert_series_equal (bf_result , pd_result , check_dtype = False )
4294
+ # Some columns implicitly convert to floating point. Use check_exact=False to ensure we're "close enough"
4295
+ assert_series_equal (
4296
+ bf_result , pd_result , check_dtype = False , check_exact = False , rtol = 0.001
4297
+ )
4295
4298
4296
4299
4297
4300
@pytest .mark .parametrize (
@@ -4375,13 +4378,16 @@ def foo(x):
4375
4378
4376
4379
pd_col = scalars_pandas_df ["int64_col" ]
4377
4380
4378
- if pd .__version__ . startswith ("2.2" ):
4381
+ if pd .__version__ [: 3 ] in ("2.2" , "2.3 " ):
4379
4382
pd_result = pd_col .apply (foo , by_row = False )
4380
4383
else :
4381
4384
pd_result = pd_col .apply (foo )
4382
4385
4383
4386
# ignore dtype check, which are Int64 and object respectively
4384
- assert_series_equal (bf_result , pd_result , check_dtype = False )
4387
+ # Some columns implicitly convert to floating point. Use check_exact=False to ensure we're "close enough"
4388
+ assert_series_equal (
4389
+ bf_result , pd_result , check_dtype = False , check_exact = False , rtol = 0.001
4390
+ )
4385
4391
4386
4392
4387
4393
@pytest .mark .parametrize (
0 commit comments