How to prevent Pandas from converting my integers to floats when I merge two dataFrames?
<p>Here is my code:</p>

<pre><code>import pandas as pd
left = pd.DataFrame({'AID': [1, 2, 3, 4],
                       'D': [2011, 2011,0, 2011],
                       'R1': [0, 1, 0, 0],
                       'R2': [1, 0, 0, 0]  })

right = pd.DataFrame({'AID': [1, 2, 3, 4],
                       'D': [2012, 0,0, 2012],
                       'R1': [0, 1, 0, 0],
                       'R2': [1, 0, 0, 0]  })

result = left.merge(right, how = 'outer')
</code></pre>

<p>When I print my result dataFrame, the integer values are now floats:</p>

<pre><code>   AID       D   R1   R2
0  1.0  2011.0  0.0  1.0
1  2.0  2011.0  1.0  0.0
2  3.0     0.0  0.0  0.0
3  4.0  2011.0  0.0  0.0
4  1.0  2012.0  0.0  1.0
5  2.0     0.0  1.0  0.0
6  4.0  2012.0  0.0  0.0
</code></pre>

<p>How do I prevent this? </p>