mols2grid
mols2grid copied to clipboard
Change CSV delimiter to a comma
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.
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