I have the following code:
import pandas as pd
x = [u\'string with some unicode: \\x16\']
df = pd.DataFrame(x)
If I try to write this datafram
for writing a data frame containing unicode characters to multiple sheets in a single excel file below code can be helpful:
%pip install xlsxwriter
from pandas import ExcelWriter
import xlsxwriter
writer = ExcelWriter('notes.xlsx')
for key in dict_df:
data[key].to_excel(writer, key,index=False,engine='xlsxwriter')
writer.save()