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
When using iterator (either old style begin()/end() or through a range-for loop) the value returned by n_rows() is off by 1. This does not happen when using the read_row pattern in a loop.
From what I can tell, the issue seems to come from CSVReader::begin() which gets a data row and construct the first iterator without incrementing the counter. Later ++ calls on the iterator correctly do that through a read_row call.
A possible fix may be to just replace the current approach of begin with a call to read_row instead of explicitly retrieving the data.
The text was updated successfully, but these errors were encountered:
When using iterator (either old style begin()/end() or through a range-for loop) the value returned by
n_rows()
is off by 1. This does not happen when using theread_row
pattern in a loop.From what I can tell, the issue seems to come from
CSVReader::begin()
which gets a data row and construct the first iterator without incrementing the counter. Later ++ calls on the iterator correctly do that through aread_row
call.A possible fix may be to just replace the current approach of
begin
with a call toread_row
instead of explicitly retrieving the data.The text was updated successfully, but these errors were encountered: