I'm reading a CSV with float numbers like this:
Bob,0.085
Alice,0.005
And import into a dataframe, and write this dataframe to a new place
df = pd.read_csv(orig)
df.to_csv(pandasfile)
Now this pandasfile
has:
Bob,0.085000000000000006
Alice,0.0050000000000000001
What happen? maybe I have to cast to a different type like float32 or something?
Im using pandas 0.9.0 and numpy 1.6.2.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…