-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DataFrame division returns infinity for 0 / 0 #8445
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
Comments
show your numpy/pandas versions. numpy used to get this completely wrong for integer division (it would return 0,0,0) in 1.8.1 not sure if they fixed it in 1.9 |
>>> pd.__version__
'0.14.1'
>>> np.__version__
'1.9.0'
>>> sys.version
'2.7.5 (default, Jun 25 2014, 10:19:55) \n[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)]' |
I think I can buy adding this want to add a test here: https://github.com/pydata/pandas/blob/master/pandas/tests/test_series.py#L2491 and fix (which is a teeny bit more complicated) (see cc @seth-p agree? |
I agree that 0/0 should be |
cc @jaimefrio |
…ros handles div and mod by zero
xref #9286
0 / 0 does not have a value, and should return NaN, not infinity.
numpy does this correctly:
The text was updated successfully, but these errors were encountered: