question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Delimiter is not detected rightly

See original GitHub issue

I have a file with no header that contains this data structure

column ; comlumn2,comlumn2,comlumn2,

column ; comlumn2,comlumn2,comlumn2,

column ; comlumn2

here the delimiter is ; but the library is detecting ,

Is the last line there is no , so why the library still detect , ?

Any solution ?

If I add a header how to tell library to detect delimiter only on header.

I found same case here but I don’t have header and last line does not contain ,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
janisddcommented, Jul 20, 2021

Again, , seems to be the “better” delimiter here as it produces more fields (which is probably desired in 90% of all cases).

You can set the delimiter directly when parsing or only use the first x lines of the data as I described here: https://github.com/mholt/PapaParse/issues/861#issuecomment-860084246

0reactions
pokolicommented, Aug 24, 2021

I do not think we should complicate more the guessing and we should assume that is not perfect (specially when mixing delimiters on data). There is already an option to specify the delimiters to guess (and its a sorted list allowing to prefer ; over ,). You should use if required.

I’m closing this issues as there is nothing else to do from our side. If yo do not agree, please provide some simple solution for your case.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel does not honor the delimiter setting for reading or ...
If I read the question right, it looks like the problem is creating (saving), a delimited file using commas for the delimiter (2nd...
Read more >
Wrong Delimiter error even though the right ...
This technote explains how to resolve a "Wrong Delimiter" error. This can occur when using the IBM Rational ClearQuest Import Tool.
Read more >
.csv file seems to have a hidden delimeter - recognized by ...
So your CSV isn't comma delimited is what appears to be the problem. The way it looks out of your Notepad copy is...
Read more >
Converting CSV to Excel: solutions for common issues
CSV not opening correctly in Excel? The tutorial investigates typical issues and provides the most effective solutions.
Read more >
Resolving common problems with CSV files
In a .csv file, a table of values is stored with columns delimited by commas, and with line breaks separating rows. The .csv...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found