I am using papa parse to read a csv file hosted remotely. The issue is that header row is not in the first line of the file, instead, the file begins with a few empty lines, then we have the header row, and then all data. I am struggling to get papa parse to ignore the empty lines at the beginning of the file. Is there something that I'm missing? I'd like to avoid loading whole the whole file (need only first few rows from over 6000 rows).
filename = "myName.csv"
Papa.parse('data/gen/csv/'.concat(filename), {
download: true,
delimiter: ",",
newline: "↵",
header: true,
dynamicTyping: true,
skipEmptyLines: true,
preview: 30,
step: function(row) {
console.log("Row:", row.data);
},
complete: function() {
console.log("All done!");
}
});