I am generating a report with the Pandas module in Python, I get the data from MySQL, but there is a column with accented data, at the time of generating the report it falls, I leave information related to the problem.
Connection code:
con = MySQLdb.connect(*datosDB)
con.set_character_set('utf8')
Where I upload the data:
multiple_dfs([
pd.DataFrame({u"Equipos":[]}), title_eq, **#aquí se caee**
pd.DataFrame({u"Información":[]}),data_eq,
pd.DataFrame({"Periodo Seleccionado":[]}),dperiod,
pd.DataFrame({"Desc":[]}),indic,perc[[" ","dB(A)","db(C)","dB(Z)"]],
pd.DataFrame({"Segundos":[]}),detalles], "Info", 'tmp/'+equipos+'_'+inicio+'.xls')
Error:
python2.7[11875]: return self.writer.write(data)
python2.7[11875]: File "/usr/lib/python2.7/codecs.py", line 351, in write
python2.7[11875]: data, consumed = self.encode(object, self.errors)
python2.7[11875]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 17: ordinal not in range(128)