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.

Set header labels in `config.header`

See original GitHub issue

If I have a CSV file without a header, I’d like to define a header in config.header. Something like this:

Papa.parse(fs.createReadStream(myCsvFile, {header: ['foo','bar','baz']}), {
  complete: function(results){
    // results is [{foo: '', bar: '', baz: ''},...]
  }
})

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

16reactions
sgehrmancommented, Jan 12, 2019

I came looking for this feature too… seems like a perfectly good idea to me.

2reactions
ataftcommented, Feb 1, 2021

This feature would ensure the result data is consistently an array of objects. You should be able to supply a header array if it’s not defined in the spreadsheet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identifying an environment or instance with a custom header ...
You can create custom labels that are displayed in the CloudBees Jenkins Platform header ... Select Configure System, and then scroll down to...
Read more >
Is there a way to specify flextable header labels by just listing ...
I see two suggestions for that. You can use set_header_df if you can provide a data.frame where colnames are associated to labels.
Read more >
Set up your header row - Microsoft Support
To confirm that Power Query recognized your headers in the top row, select Home > Transform, and then select Use first row as...
Read more >
Customizing the Default Header Labels | Spread ASP.NET 15
To change the row or column in the header in which the label is displayed, change the setting of the ColumnHeader AutoTextIndex or...
Read more >
Thread: Set header labels - Qt Centre Forum
Default Re: Set header labels ... Well, but what to do then? Your basic problem is that you call setHeaderItem() with the already...
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