parsing error when last column is empty
See original GitHub issuehello I have a file where a small number of records are “missing” a value in the last column. The file is tab delimited and the last tab is there but the parser still gives an error. For example
abc\ t0.00 \t 0.00 \t 0.00 \t 0.00 \t 0.00 \t 0.00 \t 0.00 \t 0.00 \t 0.00 \t
(I added spaces to be a little clearer).
Most of the time the last column has a value (xx or yy) but in these (valid) cases the value is an empty string. Is there a configuration option of this scenario or do I need to do via pre-processing or custom tokenizer? I hate to do this for such a small population of records but the empty string is valid.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
c++ parsing through csv file and last column
What seems to happen is if the last column is empty, it either skips it or give incorrect data (not really sure yet)....
Read more >parsing error when last column is empty · Issue #34
hello I have a file where a small number of records are "missing" a value in the last column. The file is tab...
Read more >Retrieving the last column in empty SQLite database ...
I have made an SQLite database with 15 columns and default values of NULL. I am retrieving all 15 columns from the SQLite...
Read more >Unable to do a Date parse for a Null Column
Hi Friends, I am having a Scenario having some null columns in the date field. When i try to parse it, i get...
Read more >Parsing errors with read_csv - tidyverse
Hello, I'm new to R and I'm trying to use the read_csv function. However it gives me parsing errors. I did use the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
actually I figured this out. I had the following as my settings
var tokenizer = new StringSplitTokenizer(new[] { Delimiter }, trimLine: true);
changing trimLine to false fixed it
Great! Thanks for the feedback. 🙃