Skip to content

Change CSV delimiter to a comma#63

Open
nithishbn wants to merge 2 commits into
cbouy:masterfrom
nithishbn:master
Open

Change CSV delimiter to a comma#63
nithishbn wants to merge 2 commits into
cbouy:masterfrom
nithishbn:master

Conversation

@nithishbn

Copy link
Copy Markdown

Having a semicolon as the delimiter feels a little unorthodox for a CSV. Having it be a comma makes it easier to load into various applications without an explicit delimiter.

Nithish Narasimman and others added 2 commits November 7, 2024 11:32
@cbouy

cbouy commented Nov 13, 2024

Copy link
Copy Markdown
Owner

Hi and thanks for the contribution!

It's unorthodox indeed, but in a lot of European countries the comma is often used for decimal points so a semicolon ends up being used as delimiter for CSVs in a lot of applications.
Ideally we would change the delimiter based on the locale being used, something like:

import locale
decimal_point = locale.localeconv()['decimal_point']
delimiter = ';' if decimal_point == ',' else ","

and use that instead

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

Successfully merging this pull request may close these issues.

2 participants