A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/3590 below:

Pandas mod 0 should not give 0 · Issue #3590 · pandas-dev/pandas · GitHub

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4