FutureWarning about encoding from to_excel Pandas

1.6k Views Asked by At

My code:

df.to_excel('sheet.xlsx', encoding='utf-8')

The error message:

FutureWarning: the 'encoding' keyword is deprecated and will be removed in a future version. Please take steps to stop the use of 'encoding'

How can I replace the 'encoding'?

1

There are 1 best solutions below

0
On

encoding got deprecated because it seems to be unused. There is no alternative.