Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit e7e01a9

Browse files
deal with different agg labels
1 parent bae1fdb commit e7e01a9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/system/small/test_groupby.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def test_dataframe_groupby_agg_size_string(scalars_df_index, scalars_pandas_df_i
219219
def test_dataframe_groupby_agg_list(scalars_df_index, scalars_pandas_df_index):
220220
col_names = ["int64_too", "float64_col", "int64_col", "bool_col", "string_col"]
221221
bf_result = (
222-
scalars_df_index[col_names].groupby("string_col").agg(["count", "min", "size"])
222+
scalars_df_index[col_names].groupby("string_col").agg(["count", np.min, "size"])
223223
)
224224
pd_result = (
225225
scalars_pandas_df_index[col_names]
@@ -228,7 +228,11 @@ def test_dataframe_groupby_agg_list(scalars_df_index, scalars_pandas_df_index):
228228
)
229229
bf_result_computed = bf_result.to_pandas()
230230

231-
pd.testing.assert_frame_equal(pd_result, bf_result_computed, check_dtype=False)
231+
# some inconsistency between versions, so normalize to bigframes behavior
232+
pd_result = pd_result.rename({"amin": "min"}, axis="columns")
233+
pd.testing.assert_frame_equal(
234+
pd_result, bf_result_computed, check_dtype=False, check_index_type=False
235+
)
232236

233237

234238
def test_dataframe_groupby_agg_list_w_column_multi_index(
@@ -275,6 +279,8 @@ def test_dataframe_groupby_agg_dict_with_list(
275279
)
276280
bf_result_computed = bf_result.to_pandas()
277281

282+
# some inconsistency between versions, so normalize to bigframes behavior
283+
pd_result = pd_result.rename({"amax": "max"}, axis="columns")
278284
pd.testing.assert_frame_equal(
279285
pd_result, bf_result_computed, check_dtype=False, check_index_type=False
280286
)

0 commit comments

Comments
 (0)