Skip to content Skip to sidebar Skip to footer

Csv Module Returning A Bom For First Column

I have a csv file formatted like this: type,type_mapping, style,style_mapping,Count Residential,Residential,Antique,Antique,109 Antique,Residential,Antique,Antique,48 Apt/Garage,Co

Solution 1:

You have to tell that you are reading an utf-8 file with BOM:

withopen('xref.csv', encoding='utf-8-sig') as csvData:
    ....

Then the BOM will be stripped

Post a Comment for "Csv Module Returning A Bom For First Column"