Skip to content

Add test_masking_duplicate_columns #37125

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

Closed
wants to merge 5 commits into from

Conversation

GabrielSimonetto
Copy link

@GabrielSimonetto GabrielSimonetto commented Oct 14, 2020

I don't know what an whatsnew entry is...

This PR adds a test in order to solve an issue

@dsaxton dsaxton added the Testing pandas testing functions or related to the test suite label Oct 15, 2020
@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Oct 16, 2020
@GabrielSimonetto
Copy link
Author

Somehow I missed that, it's now fixed, thanks @dsaxton

@@ -513,3 +513,10 @@ def test_set_value_by_index(self):

df.iloc[:, 0] = 3
tm.assert_series_equal(df.iloc[:, 1], expected)

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 construct this exactly as in the OP; e.g. we want these converted to numpy before the constructor. also pls parameterize as there are multiple tests indicated

Copy link
Author

Choose a reason for hiding this comment

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

Hmm, I am not sure I follow, what would be a good way to parameterize in this scope?

I saw that in order functions we have access to a check function, but if I were to put my test inside another function, it would probably be the test_columns_with_dups function, which has no access to this particular mechanism.

As for the numpy parts, I just added a commit to address that, maybe it is as it should be, thanks for the review!

Copy link
Author

Choose a reason for hiding this comment

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

@jreback I think I misread your request the first time, you are saying there should be other cases for this test? Looking at the issue again it seems to me that this single test should be enough

@pep8speaks
Copy link

pep8speaks commented Oct 18, 2020

Hello @GabrielSimonetto! 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 2020-10-18 18:14:20 UTC

@jreback
Copy link
Contributor

jreback commented Nov 19, 2020

@GabrielSimonetto can you merge master and update to comments

@arw2019
Copy link
Member

arw2019 commented Dec 8, 2020

Closing in favor of #38354

@arw2019 arw2019 closed this Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Testing pandas testing functions or related to the test suite
Projects
None yet
5 participants