-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Dispatch categorical Series ops to Categorical #19582
Conversation
Hello @jbrockmendel! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on February 13, 2018 at 16:33 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #19582 +/- ##
==========================================
- Coverage 91.62% 91.61% -0.02%
==========================================
Files 150 150
Lines 48773 48872 +99
==========================================
+ Hits 44687 44772 +85
- Misses 4086 4100 +14
Continue to review full report at Codecov.
|
I suspect this would close an issue or 2 can you have a look. |
('foo', 'bar', None), | ||
('baz', 'baz', 'baz')]) | ||
def test_ser_cmp_result_names(self, names, op): | ||
# datetime64 dtype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did any of these raise / not work before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these work at the moment. They currently retain the series's name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if you are effectively enabling something, then pls add a whatsnew note
I didn't see any issues this resolves. #19513 needs some rulings on whether Categorical behavior should change to match CategoricalIndex or vice-versa. |
I think #19513 should be fixed first. This will simplify. |
OK. That will affect the edits here a bit but not a whole lot. Given I'd like to move forward with fixing comp_method_SERIES for the datetime64 case and dont want multiple PRs touching this code, my preference would be to merge this and follow up when #19513 is resolved. |
no I think this will have to wait. moving around code just to move it around doesn't advance things. I would just rebase this after. |
There are non-Categorical-specific parts of this I'd like to push through to avoid re-doing when implementing other dtypes (mainly datetime64). Plus this fixes+tests some currently-incorrect names. Would this be easier to finish off if I reverted some/all of the Categorical edits? |
('foo', 'bar', None), | ||
('baz', 'baz', 'baz')]) | ||
def test_ser_cmp_result_names(self, names, op): | ||
# datetime64 dtype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if you are effectively enabling something, then pls add a whatsnew note
thanks. pls circle back and see if you can simplify the categorical / CI logic in here (e.g. make consistent / uniform) |
Yah, this is definitely a goal, is largely dependent on the canonical behavior being clarified in #19513. |
i would suggest making ci and categorical have a similar behavior is the first step |
Moving towards the One Implementation To Rule Them All, this has
Series[timedelta64].__cmp__
ops wrapTimedeltaIndex.__cmp__
andSeries[category].__cmp__
wrapCategorical.__cmp__
Fixes (and tests) incorrectly named results when comparing Series/Index objects.
Ref #19513