Python
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 7: ordinal not in range(128)
解决方案:
import sys reload(sys) sys.setdefaultencoding('utf8')
当然如果非shell环境下需要给个头
#coding:utf-8
pandas 如果有的时候遇到乱码
df.to_excel('result.xlsx',encoding="utf_8_sig")