-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: enable mul, div on Index by dispatching to Series #34160
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
Conversation
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.
Can you explain your changes?
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.
are we actually testing these? it seems we are enabling all numeric methods; do all of these even make sense on datetimelikes?
Yes. In particular see the tests.arithmetic tests that are currently xfailed that this un-xfails.
DTI/PI get these methods from DTA/PA, which define them with |
ok seems fine to me. @jorisvandenbossche |
lgtm. do we need a release note for the additional things that Index can now do? (e.g. can you enumerate them). pls merge master. |
updated+green |
thanks @jbrockmendel |
One of the last remaining inconsistencies between Index and Series arithmetic is that division and multiplication is entirely disabled for object-dtype Index, while for Series we operate pointwise. This PR makes Index behave the same way, and simplifies the code by using existing Series-op-wrapping code to do so.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
I'm pretty sure there is at least one issue for this, will track it down.