Repository navigation
fix: read decimals written in exponential notation - #52
Merged
Merged
Conversation
… in the profile and the import alike
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #44.
The profiler and the extractor now parse a decimal written as text with a single shared set of styles,
NumberReading.DecimalStyles = NumberStyles.Number | NumberStyles.AllowExponent. Because both use it, a column that is proposed as decimal also imports as decimal.Floatwas not used, because it drops thousands separators and1,234.56would stop reading..,-6.9345e-03reads as-0.0069345.1,5e-3reads as 0.0015.1.5e-3is neither a decimal there nor a well-formed grouped number, so it is an outlier.1E+5). It is a measurement, and a column of such values should not be proposed as a column of counts. Integer parsing is unchanged, so the profile and an import into an integer field agree on this.Tests (
ExponentNotationTests) cover the profile and the import, from csv and from xlsx text cells. They also pin that grouped numbers still read. Six of the seven failed before the change; the grouped-number test pins behaviour that was already right and has to stay right. The KNOWN-ISSUES entry is removed.