报错:
stopwords = pd.read_csv("stopwords.txt",index_col=False,quoting=3,sep=" ",names=['stopword'],encoding='UTF-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 0
Python 编码中编码解码的问题,我这个错误就是‘utf-8’不能解码位置0的那个字节(0xa1),也就是这个字节超出了utf-8的表示范围了
解决办法:
encoding='gb18030'