pydata/pandas — pull request #3600 by jreback (2013-05-14 14:28:08+00:00)
Title: BUG:  Fix integer modulo and division to make integer and float dtypes work similarly for invalid values

closes #3590

This is a numpy oddity that treats them differently.

```
In [131]: p = DataFrame({ 'first' : [3,4,5,8], 'second' : [0,0,0,3] })

In [132]: p % 0
Out[132]:
first second
0 NaN NaN
1 NaN NaN
2 NaN NaN
3 NaN NaN

In [133]: p % p
Out[133]:
first second
0 0 NaN
1 0 NaN
2 0 NaN
3 0 0

In [134]: p / p
Out[134]:
first second
0 1 inf
1 1 inf
2 1 inf
3 1 1.000000

In [135]: p / 0
Out[135]:
first second
0 inf inf
1 inf inf
2 inf inf
3 inf inf
```

Numpy does this (on integers), floats are as like above
```
In [3]: x
Out[3]:
array([[3, 0],
[4, 0],
[5, 0],
[8, 3]])

In [4]: x % 0
Out[4]:
array([[0, 0],
[0, 0],
[0, 0],
[0, 0]])

In [5]: x % x
Out[5]:
array([[0, 0],
[0, 0],
[0, 0],
[0, 0]])

In [6]: x / x
Out[6]:
array([[1, 0],
[1, 0],
[1, 0],
[1, 1]])

In [7]: x / 0
Out[7]:
array([[0, 0],
[0, 0],
[0, 0],
[0, 0]])
```