Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSVs with lines ending \r\n result in missing first column and shift in data columns #59

Open
michalskop opened this issue Dec 19, 2019 · 0 comments

Comments

@michalskop
Copy link

I the CSV file uses \r\n as it's row ending, the csvs-to-sqlite misses the first column (of data) and shifts the columns "to the left" (and the last column is therefore empty)

The \r\n ending is the default behaviour of Python's csv.writerow, see https://docs.python.org/3/library/csv.html#csv.Dialect.lineterminator

E.g.:

CSV:

id,value,number
1,3,2
2,1,7
3,4,1

results in SQLITE table:

id,value,number
3,2,
1,7,
4,1,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant