Skip to content

Commit f3f59e5

Browse files
committed
feat: added skipEmptyLines: greedy to the papaparse default options to deal with irregularities between the node and web csv read
1 parent 0f85cae commit f3f59e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/danfojs-base/io/browser/io.csv.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const $readCSV = async (file: any, options?: CsvInputOptionsBrowser): Promise<Da
5252
Papa.parse(file, {
5353
header: true,
5454
dynamicTyping: true,
55+
skipEmptyLines: 'greedy',
5556
...options,
5657
download: true,
5758
complete: results => {

src/danfojs-base/io/node/io.csv.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const $readCSV = async (filePath: string, options?: CsvInputOptionsNode): Promis
5555
const optionsWithDefaults = {
5656
header: true,
5757
dynamicTyping: true,
58+
skipEmptyLines: 'greedy',
5859
...options,
5960
}
6061

0 commit comments

Comments
 (0)