Skip to main content
Question

Reading CSV Files


Forum|alt.badge.img
I have a set of CSV files and for each of them I would just like to read in the first line of the file. Is there an easy way to do that?

 

 

I know I could read them in and use a counter and a tester to throw away all but the first line - but that would still mean that the whole of the file was read first - these are large files so I would prefer not to do that.

 

 

cheers

 

 

IanM

fmelizard
Contributor
Forum|alt.badge.img+16
  • Contributor
  • December 2, 2013
Hi Ian,

 

 

Yes , under the readers parameters > advanced, set the max features to read to 1.

 

 

Itay

takashi
Contributor
Forum|alt.badge.img+17
  • Contributor
  • December 2, 2013
Hi IanM,

 

 

"Max Features to Read" parameter of the CSV Reader might help you. Have a look at [CSV] Reader > Parameters > Advanded node in the Navigator window.

 

Takashi

Forum|alt.badge.img
Super - thanks very much ... looks just the ticket.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings