I am importing a CSV file of tabulation data generated by a market research package.
Each value field starts with a number, but then has character qualifiers and flags that relate to whether or not it is a percentage, whether the sample size is low, and so on. So example fields might include…
55
12.7
27%
33.98%
89*
91%*abe
…and so on. The numerical values are ALWAYS the first part of the field. So you never see abe91%, for example. I already know which fields represent percentages (so I don’t need to preserve the percent sign, nor do I need even to know it is there).
I can think of several inelegant ways of stripping out the text to get at the raw number (and decimals). But I know there must be one – or several – elegant solution(s).
Anyone know an elegant solution?
Thanks in advance
Brad