Comment From: jreback

you seem to have pasted the wrong number above.

In [1]: df = pd.DataFrame.from_dict({'date': ['20161024', '20161025', '20161026', '20161027', '20161028'],
   ...:                              'holding': [5, 10, 2, 4, 0],
   ...:                              'return': [1.035,-2,3.035,4.5, 1.5]})
   ...: df['return'].sum()
   ...: 
Out[1]: 8.07

In [2]: 1.035+-2+3.035+4.5+ 1.5
Out[2]: 8.07

In any event floating point numbers can not be exactly represented and only have a finite precision.

https://docs.python.org/3.5/tutorial/floatingpoint.html