Skip to content

read_csv should present the column name/index in case 'Integer column has NA values' exception #10515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vscolear opened this issue Jul 6, 2015 · 1 comment
Labels
Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv
Milestone

Comments

@vscolear
Copy link

vscolear commented Jul 6, 2015

Exception stack message:

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-21-06190a246c08> in <module>()
      2     d3_df = pd.read_csv(d3_file, sep='|', skipinitialspace=True, header=None,
      3                        names=d3_col_names, index_col=False, dtype=d3_dtypes,
----> 4                        parse_dates=['timestamp'])

/Users/vs791j/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/io/parsers.pyc 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, na_fvalues, 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)
    472                     skip_blank_lines=skip_blank_lines)
    473 
--> 474         return _read(filepath_or_buffer, kwds)
    475 
    476     parser_f.__name__ = name

/Users/vs791j/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/io/parsers.pyc in _read(filepath_or_buffer, kwds)
    258         return parser
    259 
--> 260     return parser.read()
    261 
    262 _parser_defaults = {

/Users/vs791j/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/io/parsers.pyc in read(self, nrows)
    719                 raise ValueError('skip_footer not supported for iteration')
    720 
--> 721         ret = self._engine.read(nrows)
    722 
    723         if self.options.get('as_recarray'):

/Users/vs791j/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/io/parsers.pyc in read(self, nrows)
   1168 
   1169         try:
-> 1170             data = self._reader.read(nrows)
   1171         except StopIteration:
   1172             if nrows is None:

pandas/parser.pyx in pandas.parser.TextReader.read (pandas/parser.c:7544)()

pandas/parser.pyx in pandas.parser.TextReader._read_low_memory (pandas/parser.c:7784)()

pandas/parser.pyx in pandas.parser.TextReader._read_rows (pandas/parser.c:8617)()

pandas/parser.pyx in pandas.parser.TextReader._convert_column_data (pandas/parser.c:9928)()

pandas/parser.pyx in pandas.parser.TextReader._convert_tokens (pandas/parser.c:10536)()

pandas/parser.pyx in pandas.parser.TextReader._convert_with_dtype (pandas/parser.c:11390)()

Exception: Integer column has NA values
@jreback jreback added Difficulty Novice Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv labels Jul 6, 2015
@jreback jreback added this to the Next Major Release milestone Jul 6, 2015
@jreback
Copy link
Contributor

jreback commented Jul 6, 2015

sure....pull-requests welcome

@jreback jreback modified the milestones: 0.17.0, Next Major Release Jul 10, 2015
jreback added a commit that referenced this issue Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv
Projects
None yet
Development

No branches or pull requests

2 participants