Fix for readCSV mismatch between Browser and Node #443
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a mismatch between the readCSV calls for Browser and Web. I have a CSV located at https://scikitjs.org/data/boston.csv, which has 506 rows (it's a famous Boston housing dataset). When I read it with danfojs-node with the following code
it correctly tells me that I have 506 rows, and 14 columns. But when I do the same thing with the browser build, example index.html file as follows.
then it says there are 507 rows. After some digging it looks like the dfd.readCSV has an extra "empty" line at the end of the dataframe. An easy fix for this is just to set another default parameter to the Papaparse config options
skipEmptyLines: greedy
. The docs for that option are here https://www.papaparse.com/docs and I think it would be a good addition to the default options that we pass to Papaparse.