Skip to content

Commit

Permalink
When comparing Series, sort the values in Dataframe tests (#28557)
Browse files Browse the repository at this point in the history
  • Loading branch information
caneff authored Sep 20, 2023
1 parent 93de970 commit f676d93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdks/python/apache_beam/dataframe/frames_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f676d93

Please sign in to comment.