草庐IT

1459966468

全部标签

python - 如何使用 Pandas 读取 UTF-8 文件?

我有一个带有twitter数据的UTF-8文件,我正试图将它读入Python数据帧,但我只能得到一个“对象”类型而不是unicode字符串:#file1459966468_324.csv#1459966468_324.csv:UTF-8UnicodeEnglishtextdf=pd.read_csv('1459966468_324.csv',dtype={'text':unicode})df.dtypestextobjectAirlineobjectnameobjectretweet_countfloat64sentimentobjecttweet_locationobjectdtyp

python - 如何使用 Pandas 读取 UTF-8 文件?

我有一个带有twitter数据的UTF-8文件,我正试图将它读入Python数据帧,但我只能得到一个“对象”类型而不是unicode字符串:#file1459966468_324.csv#1459966468_324.csv:UTF-8UnicodeEnglishtextdf=pd.read_csv('1459966468_324.csv',dtype={'text':unicode})df.dtypestextobjectAirlineobjectnameobjectretweet_countfloat64sentimentobjecttweet_locationobjectdtyp