I have a data like this:
## df
Col1 Col2 Col3
A234
B678 "L" shaped, cool 41
The delimiter is \t
.
df = pd.read_csv(filename, sep = "\t", dtype = str, quotechar = '""')
This is not correct.
Otherwise, I tried to import using R
language data.table
.
> df <- fread(filename, sep = "\t")
Found and resolved improper quoting out-of-sample.
>>. If the fields are not quoted (e.g. field separator does not appear within any field), try quote="" to avoid this warning.
Any solution on Python?
Or I need to use csv
package with argument quoting = csv.QUOTE_ALL
.
text file looks: (you can copy below into a text document)
Col1 Col2 Col3
A234
B678 "L" shaped, cool 41