You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can see, this is terribly designed, because you can't get access to the column names until you've actually read the first line of real data. The column names is private in CsvIterator, which makes it impossible to get to... but even if you could get to it, it would still be awful. The CsvParser should take as arguments the things that relate to the whole file, and the CsvIterator should limit its domain to things relating to each line of data. Like this:
CsvParser p = new CsvParser(inputStreamReader, separator: ',')
for (String n in p.columns) {
println(n)
}
for (line in p.parse()) {
// process line here.
}
The text was updated successfully, but these errors were encountered:
As far as I can see, this is terribly designed, because you can't get access to the column names until you've actually read the first line of real data. The column names is private in CsvIterator, which makes it impossible to get to... but even if you could get to it, it would still be awful. The CsvParser should take as arguments the things that relate to the whole file, and the CsvIterator should limit its domain to things relating to each line of data. Like this:
CsvParser p = new CsvParser(inputStreamReader, separator: ',')
for (String n in p.columns) {
println(n)
}
for (line in p.parse()) {
// process line here.
}
The text was updated successfully, but these errors were encountered: