As the error message suggests the error is being caused because of encoding. Now this could simply be an error because of encoding or it could be because the separator is incorrect.
In csv files all values are separated by commas, but that's not always the case. Sometime people also use other separator like tabs etc.
Also for a computer to be able to understand text written in a file, it is written in a special computer understandable code this code. This special code used to be ASCII but now is unicode used most predominantly (utf-8, utf-16 etc).
So either the encoding is incorrect or the separators are incorrect.
You can resolve this error by specifying these details in the to_csv methoid like this:
df.to_csv(file_name, sep='\t', encoding='utf-8')
You can learn more about panads using this tutorial: