<div dir="ltr"><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">​<span style="font-family:arial,sans-serif">I have a large (~400mb) csv file I am trying to open in Pandas. When I don't specify the dtype and open it with the following command It appears to work.</span></div></div><br>df = pd.io.parsers.read_csv(CSVFILECLEAN2013, quotechar='"', low_memory=False, na_values='')<br><br>If I try to specify the dtype for each field I get an error but no hint as to where I should look. I have "cleaned" the csv by checking that all values that should be an int for a float are either blank or can be cast as a float or a int. I guess my question is, can I get a more useful error message or is there a hint as to where the problem is that I am not seeing.<br><br>Exception                                 Traceback (most recent call last)<br><ipython-input-2-8715d8cbaa54> in <module>()<br>      3 import load_data<br>      4 import numpy as np<br>----> 5 df2 = load_data.load('jeffco_2013')<br><br>/Users/vmd/GitHub/Jeffco-Properties/tools/load_data.py in load(data)<br>     47 def load(data):<br>     48     files = dict(jeffco_2013 = '/Users/vmd/GitHub/Jeffco-Properties/Data/JeffersonCo/Datasets/2013_clean_Jeffco_ATSDTA_ATSP600.csv')<br>---> 49     return pd.io.parsers.read_csv(files[data], quotechar='"', low_memory=False, na_values='', dtype=DATASHAPE)<br><br>/Users/vmd/anaconda/envs/py34/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, 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)<br>    468                     skip_blank_lines=skip_blank_lines)<br>    469 <br>--> 470         return _read(filepath_or_buffer, kwds)<br>    471 <br>    472     parser_f.__name__ = name<br><br>/Users/vmd/anaconda/envs/py34/lib/python3.4/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds)<br>    254         return parser<br>    255 <br>--> 256     return parser.read()<br>    257 <br>    258 _parser_defaults = {<br><br>/Users/vmd/anaconda/envs/py34/lib/python3.4/site-packages/pandas/io/parsers.py in read(self, nrows)<br>    713                 raise ValueError('skip_footer not supported for iteration')<br>    714 <br>--> 715         ret = self._engine.read(nrows)<br>    716 <br>    717         if self.options.get('as_recarray'):<br><br>/Users/vmd/anaconda/envs/py34/lib/python3.4/site-packages/pandas/io/parsers.py in read(self, nrows)<br>   1162 <br>   1163         try:<br>-> 1164             data = self._reader.read(nrows)<br>   1165         except StopIteration:<br>   1166             if nrows is None:<br><br>pandas/parser.pyx in pandas.parser.TextReader.read (pandas/parser.c:7426)()<br><br>pandas/parser.pyx in pandas.parser.TextReader._read_rows (pandas/parser.c:8484)()<br><br>pandas/parser.pyx in pandas.parser.TextReader._convert_column_data (pandas/parser.c:9795)()<br><br>pandas/parser.pyx in pandas.parser.TextReader._convert_tokens (pandas/parser.c:10403)()<br><br>pandas/parser.pyx in pandas.parser.TextReader._convert_with_dtype (pandas/parser.c:11257)()<br><br>Exception: Integer column has NA values<br><br><br><br><br><br>Vincent Davis<br>720-301-3003
</div>