Dear all;
I encountered the following error, while trying to import a csv file, the basis for a notebook. The material is posted below, and thank you for any suggestions,
Andrej
/1/ I got to my tree: https://data8.berkeley.edu/user/andrej/notebooks/history-connector/Hello-Andrej.ipynb
/2/ and typed in the code, as before:
from datascience import Table
import matplotlib.pyplot as plots
plots.style.use('fivethirtyeight')
%matplotlib inline
/3/ and got a very, very different error, which I see as an improvement, and a suggestion for a next step would be wonderful!:
slavery_data = 'https://data8.berkeley.edu/user/andrej/edit/history-connector/07423-0001-Data.csv'
full_table = Table.read_table(slavery_data)
full_table
CParserError Traceback (most recent call last)
in ()
1 slavery_data = 'https://data8.berkeley.edu/user/andrej/edit/history-connector/07423-0001-Data.csv'
----> 2 full_table = Table.read_table(slavery_data)
3 full_table
/opt/conda/lib/python3.4/site-packages/datascience/tables.py in read_table(cls, filepath_or_buffer, _args, *_vargs)
323 except AttributeError:
324 pass
--> 325 df = pandas.read_table(filepath_or_buffer, _args, *_vargs)
326 return Table.from_df(df)
327
/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, dialect, compression, doublequote, escapechar, quotechar, quoting, skipinitialspace, lineterminator, header, index_col, names, prefix, skiprows, skipfooter, skip_footer, na_values, true_values, false_values, delimiter, converters, dtype, usecols, engine, delim_whitespace, as_recarray, na_filter, compact_ints, use_unsigned, low_memory, buffer_lines, warn_bad_lines, error_bad_lines, keep_default_na, thousands, comment, decimal, parse_dates, keep_date_col, dayfirst, date_parser, memory_map, float_precision, nrows, iterator, chunksize, verbose, encoding, squeeze, mangle_dupe_cols, tupleize_cols, infer_datetime_format, skip_blank_lines)
496 skip_blank_lines=skip_blank_lines)
497
--> 498 return _read(filepath_or_buffer, kwds)
499
500 parser_f.name = name
/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds)
283 return parser
284
--> 285 return parser.read()
286
287 _parser_defaults = {
/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py in read(self, nrows)
745 raise ValueError('skip_footer not supported for iteration')
746
--> 747 ret = self._engine.read(nrows)
748
749 if self.options.get('as_recarray'):
/opt/conda/lib/python3.4/site-packages/pandas/io/parsers.py in read(self, nrows)
1195 def read(self, nrows=None):
1196 try:
-> 1197 data = self._reader.read(nrows)
1198 except StopIteration:
1199 if self._first_chunk:
pandas/parser.pyx in pandas.parser.TextReader.read (pandas/parser.c:7988)()
pandas/parser.pyx in pandas.parser.TextReader._read_low_memory (pandas/parser.c:8244)()
pandas/parser.pyx in pandas.parser.TextReader._read_rows (pandas/parser.c:8970)()
pandas/parser.pyx in pandas.parser.TextReader._tokenize_rows (pandas/parser.c:8838)()
pandas/parser.pyx in pandas.parser.raise_parser_error (pandas/parser.c:22649)()
CParserError: Error tokenizing data. C error: Expected 1 fields in line 12, saw 2