-
Notifications
You must be signed in to change notification settings - Fork 358
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
Fix Series.div when divide by zero #1412
Changes from 4 commits
006f694
3a559cf
93fc548
bce4a7a
dd9b480
dbc99ec
b0fd81f
8260686
82e856c
0032eb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,7 +168,7 @@ | |
|
||
>>> df.rdiv(10) | ||
angles degrees | ||
circle NaN 0.027778 | ||
circle inf 0.027778 | ||
triangle 3.333333 0.055556 | ||
rectangle 2.500000 0.027778 | ||
|
||
|
@@ -180,7 +180,7 @@ | |
|
||
>>> df.rtruediv(10) | ||
angles degrees | ||
circle NaN 0.027778 | ||
circle inf 0.027778 | ||
triangle 3.333333 0.055556 | ||
rectangle 2.500000 0.027778 | ||
|
||
|
@@ -228,21 +228,21 @@ | |
|
||
>>> df // 10 | ||
angles degrees | ||
circle 0 36 | ||
triangle 0 18 | ||
rectangle 0 36 | ||
circle 0.0 36.0 | ||
triangle 0.0 18.0 | ||
rectangle 0.0 36.0 | ||
|
||
>>> df.floordiv(10) | ||
angles degrees | ||
circle 0 36 | ||
triangle 0 18 | ||
rectangle 0 36 | ||
circle 0.0 36.0 | ||
triangle 0.0 18.0 | ||
rectangle 0.0 36.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In short, since there is a possibility that the result can be a Someone can give an opinion about this? |
||
|
||
>>> df.rfloordiv(10) | ||
angles degrees | ||
circle NaN 0 | ||
triangle 3.0 0 | ||
rectangle 2.0 0 | ||
circle inf 0.0 | ||
triangle 3.0 0.0 | ||
rectangle 2.0 0.0 | ||
|
||
Mod by constant with reverse version. | ||
|
||
|
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.
FYI: In Python 3.x,
__div__
and__rdiv__
no more supported. Using__truediv__
and__rtruediv__
instead.