Exporting Data to CSV Pandas - issue with Foreign Characters
Are you sure your initial data is encoded in UTF-8?
I've encountered European characters in latin-1 encoding before so I would try reading in and exporting the csv with (... encoding='latin1')
I am working with a data file of customer addresses.  The source data contains foreign characters and is UTF-8 encoded.
I import the data thus:
columns = ['userid','email','firstname','lastname','phonenumber','fax','address','unit','city','province','postalcode','listing_geopoint','website','tier']
data = pd.read_csv(file, delimiter=',', usecols=columns, encoding='utf-8')
...execute some manipulation (de-duping mainly)
and then export the data thus:
clinic.to_excel('clinic-'+revision+'.xlsx',index=False)
(and I have tried this too)
clinic.to_csv('clinic-'+revision+'.csv',sep=seperator,index=False, encoding='utf-8')
In both cases when I open the export file I get the raw unicode value for foreign chars and not the foreign character.
e.g.
3031 boul de la Gare Cliniques Sp\u00e9cialis\u00e9es 3eme \u00e9tage
instead of the correct output
3031 boul de la Gare Cliniques Spécialisées 3eme étage
What am I missing?