I'm trying to load and extract data from a CSV with pandas and I'm noticing that it is changing the numbers loaded. How do I prevent this?
I've got a CSV, test.csv:
q,a,b,c,d,e,f
z,0.999211563,0.945548791,0.756781883,0.572315951,1.191243688,0.867855435
Here I load data:
df = pd.read_csv("test.csv")
print(df)
This outputs the following rounded figures:
q a b c d e f
0 z 0.999212 0.945549 0.756782 0.572316 1.191244 0.867855
What I ultimate want to do is access values by position:
print(df_.iloc[0, [1, 2, 3, 4, 5, 6]].tolist())
But this is adding numbers to some of the figures.
[0.999211563, 0.9455487909999999, 0.7567818829999999, 0.572315951, 1.191243688, 0.867855435]
Pandas is altering my data. How can I stop pandas from rounding, and adding numbers to figures?