我有一个csv文件,其数据如下:
Text Value
RT @AmericanHot We're DONE! . htt… A
RT @votevets: Hertha Berlin German #Bundesliga world.…
RT @votevets: Hertha Berlin players # world.… B
RT @HerthaBSC_EN: Hertha BSC stands forever…
RT @johanbakerr: There's no anthem played D
当我将csv文件读为
时df = pd.read_csv('Book1.csv')
它给我以下错误。我正在使用python 3.6。请帮忙。
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x85 in position 33: invalid start byte
答案 0 :(得分:2)
尝试
df=pd.read_csv('Book1.csv',dtype='unicode')
或
df=pd.read_csv('Book1.csv',dtype='unicode',encoding = "ISO-8859-1")