Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CSV parsing of empty fields, NaN and Inf values #20

Merged
merged 7 commits into from
Dec 16, 2021

Conversation

Vindaar
Copy link
Member

@Vindaar Vindaar commented Dec 12, 2021

This improves the CSV parser to address (most) of the issues of #19.

For the unaddressed "issues" see the comment in the issue.

Closes #19.

We don't need more, better to restrict ourselves, especially thanks to
the dead code elimination bug.
Essentially the logic is as follows:
- empty fields are allowed and are treated as NaN (unless they are
already determined to be strings)
- if an integer column encounters a missing value, it will be
converted to float
- explicit NaN and Inf values are now parsed correctly
This indicates the row number in which the data starts so that we know
how many rows to skip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

readCsv replaces missing values in last column with 0
1 participant