Not all decimals can be exactly represented by floats, but that doesn't seem to
be the main issue here. What you are seeing is merely the way Pandas formats
DataFrames by default when printed. The actual float stored in the DataFrame
may have more digits.
For example, with this DataFrame:
import pandas as pd
df = pd.DataFrame({'foo':[0.289798953]})
You see this:
print(df)
# foo
# 0 0.289799
But the actual float value is still 0.289798953
:
print(df.ix[0, 'foo'])
# 0.289798953
You can tell Pandas to display 9 digits after the decimal point by setting:
pd.options.display.float_format = '{:.9f}'.format
or, as cᴏʟᴅsᴘᴇᴇᴅ suggests, pd.set_option('precision', 9)
.
Then printing the DataFrame shows:
print(df)
# foo
# 0 0.289798953
You can read more about the available options here.