Attempting to utilize Papaparse with a large CSV file that is tab delimited
The code snippet appears as follows:
const fs = require('fs');
const papa = require('papaparse');
const csvFile = fs.createReadStream('mylargefile.csv');
papa.parse(csvFile, {
header: true,
delimiter: "\t",
dynamicTyping: true,
quoteChar: '"',
escapeChar: '"',
step: function(row:any) {
console.log("Row:", row.data);
},
complete: function() {
console.log("All done!");
}
});
The content of the file looks like this:
vehicle_id id_101 id_102 id_104 id_120 id_103 ...
All seems to be in order except for the first field vehicle_id
This is the output displayed on the console:
Row: { ... }
Any suggestions on how to remove the single quotes from the entry 'vehicle_id'?