Skip to content

Conversation

gabriellm1
Copy link
Contributor

Hey guys, I started working on a way to make testing.assert_frame_equal accept an argument so it can test equals a frame with duplicate index just like the issue I marked to close here. For this I had to make a couple of changes in some functions and I think I got to the point that I should ask for a better direction and if this is valid for the project.

The error pointed in the issue is definitely not the best message for this case. I got to the point to not get that error by making clear there is a duplicate index. But I got stuck in this error now:

ValueError: Shape of passed values is (5, 1), indices imply (3, 1)

@pep8speaks
Copy link

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

Line 3743:89: E501 line too long (97 > 88 characters)

Line 3832:89: E501 line too long (104 > 88 characters)

Line 1348:46: E231 missing whitespace after ','

@gfyoung gfyoung added the Testing pandas testing functions or related to the test suite label Oct 24, 2019
@WillAyd
Copy link
Member

WillAyd commented Oct 25, 2019

Hmm not sure I am on board with making this change. The point of check_like is to ignore position but align on label. If labels are duplicated how would that alignment work?

@gabriellm1
Copy link
Contributor Author

Hmmm now I see the problem. There would be multiple rows to align and check if equals. In a big dataframe that alignment solution would probably take too long to run. So probably there isn't a solution for this right?

@WillAyd
Copy link
Member

WillAyd commented Nov 8, 2019

Yea I think the alignment here as to what should be checked is ambiguous. Appreciate the PR as always but I don't think this one is worth pursuing (if anyone disagrees feel free to reopen)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assert_frame_equal with check_like throws exception if frames have repeat indices
4 participants