-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skipFirstNLines should not take the first line as header #1045
Comments
jkruke
pushed a commit
to jkruke/PapaParse
that referenced
this issue
Mar 7, 2024
jkruke
added a commit
to jkruke/PapaParse
that referenced
this issue
Mar 7, 2024
jkruke
added a commit
to jkruke/PapaParse
that referenced
this issue
Mar 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this feature hasn't been implemented as wanted in the referenced issue #738 !
The example CSV was:
Expected output should be (to be fair, it wasn't precisely specified):
But the actual output with
skipFirstNLines=2
is (according to the test cases):Analogue to the following test case in the code:
https://github.com/mholt/PapaParse/pull/1021/files#diff-e0ce8cb4901057c1880bee545909a64f38c7383b4d41982d6f2db9a8ec81eac7R1588
This test case is not realistic because it does not reflect a CSV with some preamble lines to be skipped.
should be rather:
input: 'to-be-ignored\na,b,c,d\n1,2,3,4',
andexpected.data: [{a: '1', b: '2', c: '3', d: '4'}]
.If someone wanted to skip rows of the record set, it should not be done during the parsing phase, but later when working with the data sets by doing some simple postprocessing such as
data = data.slice(1)
.@bhuvaneshwararaja, @pokoli could you please take a look at it and give me some feedback about my thoughts? :)
Originally posted by @jkruke in #1021 (comment)
The text was updated successfully, but these errors were encountered: