based on your test data - I have created a minimal example :
Probably an escaping problem ( like: "Tres Mosqueteros, Los: Adaptacic\"n"
)
"ISBN";"Book-Title"
"9500286327";"Tres Mosqueteros, Los: Adaptacic\"n"
"0671727680";"Romeo and Juliet"
"0385333757";"Losing Julia"
------ code ------
# tested with: julia 1.0.1 + [336ed68f] CSV v0.4.3
using CSV
# Create test file
books=""""ISBN";"Book-Title"
"9500286327";"Tres Mosqueteros, Los: Adaptacic\\\"n"
"0671727680";"Romeo and Juliet"
"0385333757";"Losing Julia"
"""
open("x0.csv", "w") do f
write(f, books)
end
run(`cat x0.csv`)
# Simple test
x1=CSV.read("x0.csv" ; delim=';' ,quotechar='"' ,escapechar='\\', normalizenames=true )
CSV.write( "x1.csv", x1; delim=';' ,quotechar='"' ,escapechar='\\' )
x2=CSV.read("x1.csv" ; delim=';' ,quotechar='"' ,escapechar='\\', normalizenames=true )
** ------- log -------- **
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.1 (2018-09-29)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> # tested with: julia 1.0.1 + [336ed68f] CSV v0.4.3
using CSV
julia> # Create test file
books=""""ISBN";"Book-Title"
"9500286327";"Tres Mosqueteros, Los: Adaptacic\\\"n"
"0671727680";"Romeo and Juliet"
"0385333757";"Losing Julia"
"""
"\"ISBN\";\"Book-Title\"\n\"9500286327\";\"Tres Mosqueteros, Los: Adaptacic\\\"n\"\n\"0671727680\";\"Romeo and Juliet\"\n\"0385333757\";\"Losing Julia\"\n"
julia> open("x0.csv", "w") do f
write(f, books)
end
131
julia> run(`cat x0.csv`)
"ISBN";"Book-Title"
"9500286327";"Tres Mosqueteros, Los: Adaptacic\"n"
"0671727680";"Romeo and Juliet"
"0385333757";"Losing Julia"
Process(`cat x0.csv`, ProcessExited(0))
julia> # Simple test
x1=CSV.read("x0.csv" ; delim=';' ,quotechar='"' ,escapechar='\\', normalizenames=true )
3×2 DataFrames.DataFrame
│ Row │ ISBN │ Book_Title │
│ │ Int64⍰ │ Union{Missing, String} │
├─────┼────────────┼────────────────────────────────────┤
│ 1 │ 9500286327 │ Tres Mosqueteros, Los: Adaptacic"n │
│ 2 │ 671727680 │ Romeo and Juliet │
│ 3 │ 385333757 │ Losing Julia │
julia> CSV.write( "x1.csv", x1; delim=';' ,quotechar='"' ,escapechar='\\' )
"x1.csv"
julia> x2=CSV.read("x1.csv" ; delim=';' ,quotechar='"' ,escapechar='\\', normalizenames=true )
1×2 DataFrames.DataFrame
│ Row │ ISBN │ Book_Title │
│ │ Int64⍰ │ Union{Missing, String} │
├─────┼────────────┼────────────────────────────────────┤
│ 1 │ 9500286327 │ Tres Mosqueteros, Los: Adaptacic"n │
julia>