-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
ENH: DataFrame __divmod__, __rdivmod__ #37165
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.
is this new? or just a better definition for the op? (e.g. do you need a whatsnew)
pandas/core/frame.py
Outdated
@@ -5960,6 +5960,18 @@ def _construct_result(self, result) -> DataFrame: | |||
out.index = self.index | |||
return out | |||
|
|||
def __divmod__(self, other): |
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.
shouldn't these be with other arith operators?
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.
this is the arithmetic section
pandas/core/frame.py
Outdated
@@ -5960,6 +5960,18 @@ def _construct_result(self, result) -> DataFrame: | |||
out.index = self.index | |||
return out | |||
|
|||
def __divmod__(self, other): |
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 type
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.
sure
new, will add whatsnew |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff