Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scientific notation write issue in v0.5 #480

Closed
chris-german opened this issue Aug 9, 2019 · 2 comments
Closed

Scientific notation write issue in v0.5 #480

chris-german opened this issue Aug 9, 2019 · 2 comments

Comments

@chris-german
Copy link

I've noticed when writing to CSV files in 0.5, it changes numbers and no longer puts them in scientific notation.

In the code below, the issue is reproduced.

1.9263083035570026e-11 is displayed as 1.9263083035570026e-11, but when looking at the written file, it is written as 19263083035570026e-27. This makes written files a bit more difficult to scan through.

using DataFrames, CSV

y = collect(1.0:4.0)
x = [1.0, 0.0, 1.9263083035570026e-11, 0.5]
df = DataFrame(y = y, x = x)

CSV.write("test.csv", df)
@quinnj
Copy link
Member

quinnj commented Aug 22, 2019

Thanks for reporting @chris-german; this changed because we're trying to use a lower-level float printing algorithm to customize the decimal point we print (',' for european locales, for example).

Luckily, I recently worked on porting/writing an entirely new (and faster!) float printing algorithm to Julia, and I'm planning on completely re-writing the CSV.write machinery under the hood to be much much faster. So sorry for the delay in responding here, and I'm sorry I don't have an immediate solution, but it's coming soon.

@quinnj
Copy link
Member

quinnj commented Oct 18, 2019

This was fixed in the most recent release

@quinnj quinnj closed this as completed Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants