Logo, no início no projeto, tendo carregar o arquivo conforme o solicitado:
use_cols = ["NU_NOTA_CN","NU_NOTA_CH","NU_NOTA_LC",
"NU_NOTA_MT","NU_NOTA_COMP1", "NU_NOTA_COMP2",
"NU_NOTA_COMP3","NU_NOTA_COMP4", "NU_NOTA_COMP5"]
enem = pd.read_csv('input/MICRODADOS_ENEM_2017.csv',sep=';',encoding='iso-8859-1',usecols = use_cols)
Logo, o que resulta nisso:
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-9-7ca2957991c2> in <module>
5 "NU_NOTA_COMP3","NU_NOTA_COMP4", "NU_NOTA_COMP5"]
6
----> 7 enem = pd.read_csv('input/MICRODADOS_ENEM_2017.csv',sep=';',encoding='iso-8859-1',usecols = use_cols)
c:\python38\lib\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, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision)
674 )
675
--> 676 return _read(filepath_or_buffer, kwds)
677
678 parser_f.__name__ = name
c:\python38\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds)
452
453 try:
--> 454 data = parser.read(nrows)
455 finally:
456 parser.close()
c:\python38\lib\site-packages\pandas\io\parsers.py in read(self, nrows)
1131 def read(self, nrows=None):
1132 nrows = _validate_integer("nrows", nrows)
-> 1133 ret = self._engine.read(nrows)
1134
1135 # May alter columns / col_dict
c:\python38\lib\site-packages\pandas\io\parsers.py in read(self, nrows)
2035 def read(self, nrows=None):
2036 try:
-> 2037 data = self._reader.read(nrows)
2038 except StopIteration:
2039 if self._first_chunk:
pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader.read()
pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._read_low_memory()
pandas\_libs\parsers.pyx in pandas._libs.parsers._concatenate_chunks()
<__array_function__ internals> in concatenate(*args, **kwargs)
MemoryError: Unable to allocate 51.4 MiB for an array with shape (6731341,) and data type float64
alguém já passou por isso?