by quickthrower2 · 5y ago · 0 comments
Import a csv reader library that can stream.
Read each line and apply a series of regex, each one classifying on match.
Eg
^0\d{8}$
Means stringThen have a reduction rule e.g.
If so far we think it’s a numeric column and we get a string then treat as string.
If so far we think it’s a numeric column and we get a number it is still a numeric column.
Then doing the regex and reduce in a loop will give you the final answers.
Happy to knock up some example code if you wish.
I’ll put something together though when I get some time