我知道已经问过类似的问题,我已经看过所有问题并尝试过,但几乎没有帮助。我正在使用OSX 10.11 El Capitan,python3.6。,虚拟环境,也尝试不使用它。我正在使用jupyter笔记本和spyder3。
我是python的新手,但是了解基本的ML并关注以下文章以学习如何解决Kaggle的挑战:链接到Blog,链接到数据集
我被困在代码的前几行
import pandas as pd
destinations = pd.read_csv("destinations.csv")
test = pd.read_csv("test.csv")
train = pd.read_csv("train.csv")
Run Code Online (Sandbox Code Playgroud)
这给了我错误
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-19-a928a98eb1ff> in <module>()
1 import pandas as pd
----> 2 df = pd.read_csv('destinations.csv', compression='infer',date_parser=True, usecols=([0,1,3]))
3 df.head()
/usr/local/lib/python3.6/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, …Run Code Online (Sandbox Code Playgroud)