You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
The parser will convert both numString and num to Integers. What we want is numString to not be converted to Integer but remain as string.
One method to achieve this would be to use a custom auto_parse function with quote option set to false and manually checking if the value is within quotes and not convert then to Integer.
But with that, as a side effect "Tim, Lee" gets split into two values Tim and Lee which is not something we want.
Could you suggest some method how this preservation could be achieved?
The text was updated successfully, but these errors were encountered:
I understand your usecase, but speaking CSV, there are no reason to treat a field surrounded by double quotes differently than a field without it. The "auto_parse" options is intrusive and, as such, has limits. If you need full control, a post stream transformer is needed to apply custom user functions. This is the reason why we ship stream-transform. Do you agree ?
If we consider the following csv file
The parser will convert both
numString
andnum
to Integers. What we want isnumString
to not be converted to Integer but remain as string.One method to achieve this would be to use a custom
auto_parse
function withquote
option set tofalse
and manually checking if the value is within quotes and not convert then to Integer.But with that, as a side effect
"Tim, Lee"
gets split into two valuesTim
andLee
which is not something we want.Could you suggest some method how this preservation could be achieved?
The text was updated successfully, but these errors were encountered: