1

CSV file looks as follows when opened in text editor

answer,context,probability
"Arya Stark,","f Eddard and Catelyn Stark.
* Arya Stark, younger daughter of Eddard an",0.43330684040086
"""Ned"" Stark,"," Night's Watch.
* Lord Eddard ""Ned"" Stark, Warden of the North and Lord ",0.017467418608936747

When opened in excel it looks like this :

enter image description here

Using fread() I am getting the following datatable

df = data.table::fread( file.choose() )

enter image description here

Using read.csv() I am facing no such error.

Have looked in the following two links however the solutions provided there does not sole the problem.

Using fread to read data with double quotes and incorrect escape characters

Error reading Field with Double Quotes and Commas using Fread

How to solve this ?

Soumya Boral
  • 1,191
  • 14
  • 28

0 Answers0