我正在使用以下代码进行xlsx
至csv
的会话
import pandas as pd
read_file = pd.read_excel (r'C:\Users\XYZ\Documents\ABC.xlsx',ENCODING='utf-8')
read_file.to_csv (r'C:\Users\XYZ\Documents\ABC.csv', index = None, header=True)
代码会隐瞒该部分,直到它在列值之一中达到此特殊字符为止
Ñ
-类似的东西
,它失败并显示以下错误
Error:- UnicodeEncodeError: 'ascii' codec can't encode character u'\xd1' in position 13: ordinal not in range(128)