Maybe you are using windows line endings \r\n rather than plain \n ?
On github raw file view does look like an extra char there.
Either edit the file - or add a function to .trim() off the whitespace.
Thanks for the response dceejay, i'm generating the csv file in excel i've tried MS-DOS, UTF-8 and regular CSV, sadly non of these options resolved it however when i created the file in Bbedit and saved it with Unix line endings result it works thank you!