Skip to content

Minor improvements in dealing with empty floats #15

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dazzag24
Copy link
Contributor

@dazzag24 dazzag24 commented Dec 5, 2019

Dealing with a 69M row CSV that has a column that I've set as a float. Occasionally there are rows with empty values which was throwing a ValueError. This PR add debugging info as well as allowing these empty values to be replaced with a NAN instead.

Print out the row number that caused the error to aid debugging of the CSV file.
Test for empty string and if empty output value as float('nan')
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.

1 participant