You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
figured as much. kinda weird since one usually thinks about modulus as Z mod (another integer). also i can imagine a modulo for object blocks...string interp and such. @tavistmorph don't know if u know but numpy operates this way too, e.g., array_equal(p.values % 0, zeros_like(p)) evaluates to True.
In python:
3 % 0
is undefined and returns "ZeroDivisionError: integer division or modulo by zero"
But in pandas 0.11, that gives 0. I believe that is incorrect. It ought to give NaN or Inf
p = pandas.DataFrame({ 'first' : [3,4,5,8], 'second' : [0,0,0,3] })
p['mod'] = p['first'] % p['second']
p
The text was updated successfully, but these errors were encountered: