Skip to content

Conversation

@heckendorfc
Copy link

Missing values in input files are sometimes written as NA (or some other string) in input files. float() will fail to parse these values:
ValueError: could not convert string to float: NA

Catching these exceptions and returning nan instead sets the data, eventually, to the needed 0 value.

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