Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update fix ignored sort in api.py and add test #43833

Merged

Conversation

CloseChoice
Copy link
Member

@CloseChoice CloseChoice commented Oct 1, 2021

As mentioned in the ticket, the function api.union_indexes does not handle the sort parameter. I added support for it, but we explicitly check that sort can only take the values False and None in here

@pep8speaks
Copy link

pep8speaks commented Oct 1, 2021

Hello @CloseChoice! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-10-08 14:56:28 UTC

@@ -63,3 +63,13 @@ def test_concat_series_with_numpy(to_concat_dtypes, result_dtype):
result = pd.concat([s2, s1], ignore_index=True)
expected = pd.Series([0, 1, 0, 1, pd.NA], dtype=object).astype(result_dtype)
tm.assert_series_equal(result, expected)


def test_concat_frame_with_sort_false():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move to pandas/tests/reshape/concat/test_sort.py

put near simliar tests

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might have to adjust some other tests

@CloseChoice
Copy link
Member Author

might have to adjust some other tests

Can we just adjust other test results? That would be technically be a breaking change, wouldn't it?

@jreback
Copy link
Contributor

jreback commented Oct 3, 2021

my point about adjusting test is that this case might be only internal or not - will have to see

@CloseChoice
Copy link
Member Author

@github-actions pre-commit

@jreback jreback added this to the 1.4 milestone Oct 8, 2021
@jreback jreback added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Oct 8, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, can you add a whatsnew note for 1.4, reshaping and ping on green

@CloseChoice
Copy link
Member Author

@github-actions pre-commit

@CloseChoice
Copy link
Member Author

CloseChoice commented Oct 8, 2021

@jreback all lights on green. I also added a whatsnew entry.

@CloseChoice CloseChoice requested a review from jreback October 9, 2021 20:40
@jreback jreback merged commit 01b8d2a into pandas-dev:master Oct 10, 2021
@jreback
Copy link
Contributor

jreback commented Oct 10, 2021

thanks @CloseChoice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: concat still sorts columns if they differ
3 participants