title: pandas rounding when converting float to integer
body: <p>I've got a pandas DataFrame with a float (on decimal) index which I use to look up values (similar to a dictionary). As floats are not exactly the value they are supposed to be multiplied everything by 10 and converted it to integers <code>.astype(int)</code> before setting it as index. However this seems to do a <code>floor</code> instead of rounding. Thus 1.999999999999999992 is converted to 1 instead of 2. Rounding with the <code>pandas.DataFrame.round()</code> method before does not avoid this problem as the values are still stored as floats.</p>
  
  <p>The original idea (which obviously rises a key error) was this:</p>
  
  <pre><code>idx = np.arange(1,3,0.001)
  s = pd.Series(range(2000))
  s.index=idx
  print(s[2.022])
  </code></pre>
  
  <p>trying with converting to integers:</p>
  
  <pre><code>idx_int = idx*1000
  idx_int = idx_int.astype(int)
  s.index = idx_int
  for i in range(1000,3000):
      print(s[i])
  </code></pre>
  
  <p>the output is always a bit random as the 'real' value of an integer can be slightly above or below the wanted value. In this case the index contains two times the value 1000 and does not contain the value 2999.</p>