Skip to content

updated test that works with pandas 1.2 #1562 - #1584

Merged
fidelram merged 1 commit into
masterfrom
fix_sorting_error_pandas1_2
Jan 14, 2021
Merged

fidelram merged 1 commit into
masterfrom
fix_sorting_error_pandas1_2

Conversation

@fidelram

@fidelram fidelram commented Jan 13, 2021 •

Copy link
Copy Markdown
Collaborator

This PR addresses #1562
A test requiring sorting was updated such that it works the same with pandas<1.2.0 or pandas>=1.2.0.

The issue was caused by the test having identical values to sort.

@ivirshup

Copy link
Copy Markdown
Member

I think that having the case with identical values is actually useful, since otherwise we're not checking this edge case. Ideally, I think we should be using a stable sort so results will be consistent in the case of similar values.

@ivirshup

Copy link
Copy Markdown
Member

Huh, it looks like pandas does not have the option for doing a stable sort here, so maybe we should change the test.

@fidelram

Copy link
Copy Markdown
Collaborator Author

Yeah, I check to see if there was some option to get the same sorting regardless of the pandas version, but could not find anything. I will merge the change.

@fidelram
fidelram merged commit 2a12306 into master Jan 14, 2021
@flying-sheep
flying-sheep deleted the fix_sorting_error_pandas1_2 branch October 30, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants