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

CSV.write - floats #492

Open
bkamins opened this issue Sep 5, 2019 · 4 comments
Open

CSV.write - floats #492

bkamins opened this issue Sep 5, 2019 · 4 comments
Milestone

Comments

@bkamins
Copy link
Member

bkamins commented Sep 5, 2019

When outputting floats when writing a CSV file it would be nice to allow users to control what kind of notation should be used (maybe allow to pass a formatter). The issue is that:

  1. sometimes you are OK with the default
  2. sometimes you may want to enforce scientific notation
  3. sometimes you might want to enforce rounding (this is needed when later you want to read in the file using other software that does not accept that many decimal digits as are normally printed by Julia - what I mean is that eg. 3.141592653589793 is parsed incorrectly by some readers and you need to round it to e.g. 8 decimal digits)

This is a minor issue.

@quinnj quinnj added this to the 1.X milestone Jun 26, 2020
@quinnj
Copy link
Member

quinnj commented Jun 26, 2020

Marking as 1.X milestone, meaning I don't plan on implementing this before 1.0 release (which will happen soon). I was originally hoping JuliaLang/julia#32859 would land in a reasonable amount of time, but alas, it has fallen by the wayside of paltry review. My next solution is to just put the functionality in a package and we can use it here.

@juliohm
Copy link

juliohm commented Mar 29, 2023

@quinnj any update on this feature? We are working on a project where we need to export the floating point numbers without scientific notation. Any option to save all floating point numbers with a fixed number of decimals?

@quinnj
Copy link
Member

quinnj commented Mar 31, 2023

No update as of yet, but I'm hoping to have time to address this soon as we do a blitz on CSV open issues.

@jkoefinger
Copy link

I agree with @bkamins. Would be great if this could be fixed. A single notation makes it easier to share data with people using other programming languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants