pandas读取csv文件的编码总结:

import pandas as pd
reader = pd.read_csv(file_path
                         , sep='\t'
                         # , encoding='gb18030'
                         # , encoding='unicode_escape'
                         # , encoding='utf-16'
                         # , encoding='utf-8'
                     	 # , encoding='GBK'
                     	 # , encoding='shift-jis' # 日文编码
                     	 # , encoding='GB2312'
                     	 # , encoding="cp1252"
                     	 # , encoding="latin1"
    )
# 日语的文字编码主要是这三种
"Shift_JIS", "EUC-JP", "ISO-2022-JP"

你可能感兴趣的:(pandas,python)