Resetting the index to zero means, it is like iterating the index for new line..
I know what resetting the index means. Incrementing it before you set it to 0 is what doesn't make sense.
I have attached the CSV file for your perusal.
To the men's room wall?
Why would we need to see the CSV file, when both your Python code and your Arduino code have flaws that you don't seem to have fixed? Or, if you have, you haven't posted the new(er) versions.
If the data is comma-separated integers delimited by end-of-line characters with no spaces, the code is something like
int vec[100]; // space for 100 integers
int numbers = 0; // the number of numbers we have read so far
loop() {
if(there's another character available) {
char c = read the character();
if(ch is a comma) {
numbers ++;
vec[numbers] = 0;
}
else if(ch is an end-of-line) {
numbers ++;
do_something_with_this_row_of_data();
// reset the row
numbers = 0;
vec[0] = 0;
}
else if(ch is a digit) {
vec[numbers] = vec[numbers] * 10 + (ch - '0');
}
}
}
void do_something_with_this_row_of_data() {
for(int i = 0; i<numbers; i++) {
if(i!=0) Serial.print(',');
Serial.print(vec[i]);
}
Serial.println();
}