From f676d93030cf9d0c849337f1e3a4efff1d8f2509 Mon Sep 17 00:00:00 2001 From: caneff Date: Wed, 20 Sep 2023 12:34:41 -0400 Subject: [PATCH] When comparing Series, sort the values in Dataframe tests (#28557) --- sdks/python/apache_beam/dataframe/frames_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdks/python/apache_beam/dataframe/frames_test.py b/sdks/python/apache_beam/dataframe/frames_test.py index 4998683461b9..30d992480515 100644 --- a/sdks/python/apache_beam/dataframe/frames_test.py +++ b/sdks/python/apache_beam/dataframe/frames_test.py @@ -193,6 +193,9 @@ def _run_test( if expected.index.is_unique: expected = expected.sort_index() actual = actual.sort_index() + elif isinstance(expected, pd.Series): + expected = expected.sort_values() + actual = actual.sort_values() else: expected = expected.sort_values(list(expected.columns)) actual = actual.sort_values(list(actual.columns))