Need to convert list of values with long mantissa into pd.DataFrame without precision lost:
My list of decimals:
The way pd.DataFrame convert it.
The values are stored with the correct precision, they are just truncated when you display them.
You can change the precision used by pandas when displaying datarames by using pd.set_option('display.precision', num_decimal_digits)
.
For example
df = pd.DataFrame([0.123456789])
print('Before setting precision:')
print(df)
pd.set_option('display.precision', 9)
print('After setting precision:')
print(df)
prints
Before setting precision:
0
0 0.123457
After setting precision:
0
0 0.123456789