I think it’s a bug in CSV but I’m not 100% sure that’s why I ask here first:
I wrote some code to convert a txt file into a csv file (basically adding a header and commata).
My code:
fname = input_name = split(split(txt_file,"/")[end], ".")[1]
header = ["x","y","z","d"]
df = CSV.read(txt_file, delim=" ", header=header)
println(df)
CSV.write("../inputs/csv/"*fname*".csv", df)
The txt file:
1234.56789 4232.45455455 -8789.5455 1.0121325235677855e-11
The print out:
fname: test_123
1×4 DataFrame
│ Row │ x │ y │ z │ d │
│ │ Float64 │ Float64 │ Float64 │ Float64 │
├─────┼─────────┼─────────┼──────────┼─────────────┤
│ 1 │ 1234.57 │ 4232.45 │ -8789.55 │ 1.01213e-11 │
The csv file:
x,y,z,d
1234.56789,4232.45455455,-8789.5455,10121325235677855e-27
It should have the same scientific representation (the true scientific notation maybe if the other one has more than one digit in front of the decimal point) in my opinion.