Skip to content

trouble reading .csv file when Excel is running in FR locale #16

@jbnivoit

Description

@jbnivoit

csv_reader = csv.DictReader(file)

this line needs to be adjusted with "csv.DictReader(file, delimiter=';')" since the delimiter in CSV in this situation is not (confusingly) a comma but a semicolon. I don't think this needs to be fixed, I am just leaving it here in case someone else needs to make the same adjustment.

Finally in numeric values in French locale, the "." is really emitted as a comma, so one needs to mass-replace "," with ".".

Similarly, if you see errors such as :

ValueError: could not convert string to float: '\u202f12320'

that is because the thousand separator is \u202f ("_"), so one needs to edit the file to remove those characters.

Once these 3 issues are adressed, it is possible to run the tool with the CSV file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions