Pandas – Writing an excel file containing unicode – IllegalCharacterError

The same problem happened to me. I solved it as follows:

First, install python package xlsxwriter:

pip install xlsxwriter

Second, replace the default engine ‘openpyxl’ with ‘xlsxwriter’:

df.to_excel("test.xlsx", engine="xlsxwriter")

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)