Def parse_data_from_file() got wrong len from data

Dear mentor:
I couldn’t get correct len(sentences) , got 1 less than expected output.
And I see one of the thing i need to note is "* You should NOT omit the first line as the file does not contain headers. ", I don’t understand this. I did’t omit anything in my code no?
Pls kindly let me know.
Thanks!

1 Like

Hi @Clare_Chung, thanks for reaching out!

next(reader) skips the first line in the csv file, you don’t need it since there are no headers.
Simply remove it and your problem should be solved.

Many thx! Now I understand it.

My pleasure, Happy learning !