From 5d6bb03f960f6a6d0a5e4497e7d3caf3375ef335 Mon Sep 17 00:00:00 2001 From: Christopher Neffshade Date: Wed, 20 Sep 2023 14:36:27 +0000 Subject: [PATCH] Fix logic for _run_test --- 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 fa121aa85c30..15ec7e8ee6b4 100644 --- a/sdks/python/apache_beam/dataframe/frames_test.py +++ b/sdks/python/apache_beam/dataframe/frames_test.py @@ -187,6 +187,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))