Df.round() is returning frustrating results.
In the following example, I am trying to round a decimal to five digits. Each decimal has a 5 in the sixth decimal position. When I round, I expect the fifth decimal value to round up. This only happens sometimes..
df2 = pd.DataFrame([0.703125, 0.831215])
df2
Out[4]:
0
0 0.703125
1 0.831215
df2.round(5)
Out[5]:
0
0 0.70312
1 0.83122
After some googling, it sounds like the issue relates to how floating point numbers are represented by the computer. What's a practical way to get around this issue?