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

TST: add test for DataFrame with duplicate indices concat #45888

Merged
merged 16 commits into from
Feb 11, 2022

Conversation

zhengfeiwang
Copy link
Contributor

@zhengfeiwang zhengfeiwang commented Feb 9, 2022

Previously DataFrame with duplicate indices will raise ValueError. With some changes, this will raise InvalidIndexError. This PR add a test for this behavior.

DataFrame.join() with duplicate indices should raise now and add test for this.
catch concat's raise, not join
@zhengfeiwang
Copy link
Contributor Author

@github-actions pre-commit

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Feb 10, 2022
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

Could you merge in the main branch one more time? For some reason not all the checks ran.

@zhengfeiwang
Copy link
Contributor Author

Merged and seems more checks are queued, let's wait and see。

@jreback jreback added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label Feb 11, 2022
@jreback jreback added this to the 1.5 milestone Feb 11, 2022
@pep8speaks
Copy link

pep8speaks commented Feb 11, 2022

Hello @zhengfeiwang! 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 2022-02-11 11:41:58 UTC

zhengfeiwang and others added 6 commits February 11, 2022 10:34
remove whitespace in blank line
add detailed description for test, also tend to trigger all checks
use concat directly instead of pd.concat for flake8
@mroeschke mroeschke merged commit 5c89090 into pandas-dev:main Feb 11, 2022
@mroeschke
Copy link
Member

Thanks @zhengfeiwang

phofl pushed a commit to phofl/pandas that referenced this pull request Feb 14, 2022
…#45888)

* add test for DataFrame.join()

DataFrame.join() with duplicate indices should raise now and add test for this.

* Update test_join.py

catch concat's raise, not join

* Fixes from pre-commit [automated commit]

* Update test_join.py

add msg for pytest.raises for Code Check

* move new test to concat

* Update test_concat.py

remove whitespace in blank line

* Fixes from pre-commit [automated commit]

* Update test_concat.py

add detailed description for test, also tend to trigger all checks

* Update test_concat.py

use concat directly instead of pd.concat for flake8
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
…#45888)

* add test for DataFrame.join()

DataFrame.join() with duplicate indices should raise now and add test for this.

* Update test_join.py

catch concat's raise, not join

* Fixes from pre-commit [automated commit]

* Update test_join.py

add msg for pytest.raises for Code Check

* move new test to concat

* Update test_concat.py

remove whitespace in blank line

* Fixes from pre-commit [automated commit]

* Update test_concat.py

add detailed description for test, also tend to trigger all checks

* Update test_concat.py

use concat directly instead of pd.concat for flake8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pd.concat() crashes if dataframe contains duplicate indices but not df.join()
4 participants