Skip to content

Tests for where() with categorical #37182

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

Merged
merged 4 commits into from
Oct 20, 2020

Conversation

gabriellm1
Copy link
Contributor

@gabriellm1 gabriellm1 commented Oct 17, 2020

Hey everyone,

I wrote some tests for issue #18888. I don't know exactly if the format is correct but if any change is needed I'm happy to make it right.

Which 'whatsnew entry' should I report for both new tests?

Also, if you think this is a decent contribution and if there's no problem with doing that, it would be nice to tag this PR with hacktoberfest-accepted label :)

Copy link
Member

@arw2019 arw2019 left a comment

Choose a reason for hiding this comment

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

Thanks @gabriellm1 for the PR!

Some comments.

I would use the pytest.mark.parametrize to put these tests together. Possibly you want to parametrize on klass (which could be Series or DataFrame) - take a look in other tests for examples.

No need for a whatsnew since this isn't making a user facing change.

Let me know if you have any questions!

@jreback jreback added Categorical Categorical Data Type Testing pandas testing functions or related to the test suite Indexing Related to indexing on series/frames, not to indexes themselves labels Oct 17, 2020
@gabriellm1
Copy link
Contributor Author

@arw2019 Joined both tests the way you suggested!

@jreback Don't know how is the project policy with Hacktoberfest this year but if it's ok to label this PR with 'hacktoberfest-accepted' I would appreciate it very much!

@jreback jreback added this to the 1.2 milestone Oct 20, 2020
@jreback jreback merged commit 01cf2f2 into pandas-dev:master Oct 20, 2020
@jreback
Copy link
Contributor

jreback commented Oct 20, 2020

thanks @gabriellm1

JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Oct 26, 2020
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Indexing Related to indexing on series/frames, not to indexes themselves Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Category type is discarded with where series method
3 participants