import pandas as pd
from sklearn import preprocessing
import numpy as np
df = pd.read_csv("C:/Users/nasif/Desktop/ashik_Thesis/wbpc_data.csv")
我正在处理这些数据:https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/wpbc.data
我已将其下载为文本文件,然后将其转换为csv文件。 但它没有显示错误。
IOError Traceback (most recent call last)
<ipython-input-15-118820404033> in <module>()
12
13
---> 14 df = pd.read_csv("C:/Users/nasif/Desktop/ashik_Thesis/wbpc_data.csv")
C:\Users\nasif\Anaconda2\lib\site-packages\pandas\io\parsers.pyc 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, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, skip_footer, doublequote, delim_whitespace, as_recarray, compact_ints, use_unsigned, low_memory, buffer_lines, memory_map, float_precision)
653 skip_blank_lines=skip_blank_lines)
654
--> 655 return _read(filepath_or_buffer, kwds)
656
657 parser_f.__name__ = name
C:\Users\nasif\Anaconda2\lib\site-packages\pandas\io\parsers.pyc in _read(filepath_or_buffer, kwds)
403
404 # Create the parser.
--> 405 parser = TextFileReader(filepath_or_buffer, **kwds)
406
407 if chunksize or iterator:
C:\Users\nasif\Anaconda2\lib\site-packages\pandas\io\parsers.pyc in __init__(self, f, engine, **kwds)
760 self.options['has_index_names'] = kwds['has_index_names']
761
--> 762 self._make_engine(self.engine)
763
764 def close(self):
C:\Users\nasif\Anaconda2\lib\site-packages\pandas\io\parsers.pyc in _make_engine(self, engine)
964 def _make_engine(self, engine='c'):
965 if engine == 'c':
--> 966 self._engine = CParserWrapper(self.f, **self.options)
967 else:
968 if engine == 'python':
C:\Users\nasif\Anaconda2\lib\site-packages\pandas\io\parsers.pyc in __init__(self, src, **kwds)
1580 kwds['allow_leading_cols'] = self.index_col is not False
1581
-> 1582 self._reader = parsers.TextReader(src, **kwds)
1583
1584 # XXX
pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader.__cinit__ (pandas\_libs\parsers.c:4209)()
pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source (pandas\_libs\parsers.c:8873)()
IOError: File C:/Users/nasif/Desktop/ashik_Thesis/wbpc_data.csv does not exist.