mafintosh / mafintosh/csv-parser
When parsing a CSV that has headers with 2 or more matching names, data is lost
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 143
- PR merge metrics
- No merged PRs in 30d
Description
- Operating System: macOS 13.2
- Node Version: 14.15.4
- NPM Version: 6.14.0
- csv-parser Version: 3.0.0
Expected Behavior
The parsed data should be maintained in an array of strings instead of a single string.
Actual Behavior
Only the last read value is maintained.
How Do We Reproduce?
- Create a .csv file with at least columns with the same name and one row with different data for each
- Try to parse the data without losing data
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a CSV containing duplicate header names and distinct values, then trace the parser's header-handling entry point. Add a regression test showing that all values for matching headers are preserved in an array, and confirm the existing parser tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100