My Excel spread uses apostrophes to separate thousands and even worse it uses" ’ " instead of straight apostroph e.g. 1’000. Is there a way to specify this in CSV.read()? Because when I import data it interprets 1’000 as 1\x92000.
Excel Data comes in the form of:
Amount;Date;Time
1’000;10.01.2022;13:22:17
6’000;10.01.2022;13:20:12
3’000;10.01.2022;13:23:08
then I use
df=CSV.read(“filepath.csv”, delim =“;”, dateformat= “dd.mm.yyyy”, normalizenames= true, DataFrame);
println(df) shows the Amount as String7 which prohibits me from doing any calculation with the data.
Welcome to the community! Can you post an example of the data that you’re trying to read so that others can easily copy/paste it as they attempt to help? Thanks!
@drvijust added support for this in the Parsers.jl package, so now we just need to plumb support for this in the CSV.jl package if someone wanted a pretty easy first issue to try out.
using CSV
# In many places in the world, digits to the left of the decimal place are broken into
# groups by a thousands separator. We can ignore those separators by passing the `groupmark`
# keyword argument.
data = """
x y
1 2
2 1,729
3 87,539,319
"""
file = CSV.File(IOBuffer(data); groupmark=',')