quickdraw-dataset icon indicating copy to clipboard operation
quickdraw-dataset copied to clipboard

Hi There, anyone who can help me to figure out why I cannot open my csv file on Jupyter?

Open TheInsightsBuilder opened this issue 3 years ago • 0 comments

import pandas

df= pandas.read_csv('inventory_INVENTORY_TRANSACTION_.csv')

print(df) import pandas ​ df= pandas.read_csv('inventory_INVENTORY_TRANSACTION_.csv') ​ print(df)

ParserError Traceback (most recent call last) in 1 import pandas 2 ----> 3 df= pandas.read_csv('inventory_INVENTORY_TRANSACTION_.csv') 4 5 print(df)

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read_csv(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, storage_options) 608 kwds.update(kwds_defaults) 609 --> 610 return _read(filepath_or_buffer, kwds) 611 612

~\anaconda3\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds) 466 467 with parser: --> 468 return parser.read(nrows) 469 470

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 1055 def read(self, nrows=None): 1056 nrows = validate_integer("nrows", nrows) -> 1057 index, columns, col_dict = self._engine.read(nrows) 1058 1059 if index is None:

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 2059 def read(self, nrows=None): 2060 try: -> 2061 data = self._reader.read(nrows) 2062 except StopIteration: 2063 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.TextReader._read_rows()

pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader._tokenize_rows()

pandas_libs\parsers.pyx in pandas._libs.parsers.raise_parser_error()

ParserError: Error tokenizing data. C error: Expected 20 fields in line 46, saw 33

import pandas

df= pandas.read_csv('C:\Users\Marcos\OneDrive\Desktop\DATA\inventory_INVENTORY_TRANSACTION_.csv')

print(df) import pandas ​

df= pandas.read_csv('C:\Users\Marcos\OneDrive\Desktop\DATA\inventory_INVENTORY_TRANSACTION_.csv')

​ print(df)

NameError Traceback (most recent call last) in 3 # df= pandas.read_csv('C:\Users\Marcos\OneDrive\Desktop\DATA\inventory_INVENTORY_TRANSACTION_.csv') 4 ----> 5 print(df)

NameError: name 'df' is not defined

import pandas

df= pandas.read_csv("inventory_INVENTORY_TRANSACTION_.csv")

print(df) import pandas ​ df= pandas.read_csv("inventory_INVENTORY_TRANSACTION_.csv") ​ print(df)

ParserError Traceback (most recent call last) in 1 import pandas 2 ----> 3 df= pandas.read_csv("inventory_INVENTORY_TRANSACTION_.csv") 4 5 print(df)

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read_csv(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, storage_options) 608 kwds.update(kwds_defaults) 609 --> 610 return _read(filepath_or_buffer, kwds) 611 612

~\anaconda3\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds) 466 467 with parser: --> 468 return parser.read(nrows) 469 470

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 1055 def read(self, nrows=None): 1056 nrows = validate_integer("nrows", nrows) -> 1057 index, columns, col_dict = self._engine.read(nrows) 1058 1059 if index is None:

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 2059 def read(self, nrows=None): 2060 try: -> 2061 data = self._reader.read(nrows) 2062 except StopIteration: 2063 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.TextReader._read_rows()

pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader._tokenize_rows()

pandas_libs\parsers.pyx in pandas._libs.parsers.raise_parser_error()

ParserError: Error tokenizing data. C error: Expected 20 fields in line 46, saw 33

import pandas

df= pandas.read_csv("inventory_INVENTORY_TRANSACTION_.csv")

df.head() import pandas ​ df= pandas.read_csv("inventory_INVENTORY_TRANSACTION_.csv") ​ df.head()

ParserError Traceback (most recent call last) in 1 import pandas 2 ----> 3 df= pandas.read_csv("inventory_INVENTORY_TRANSACTION_.csv") 4 5 df.head()

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read_csv(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, storage_options) 608 kwds.update(kwds_defaults) 609 --> 610 return _read(filepath_or_buffer, kwds) 611 612

~\anaconda3\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds) 466 467 with parser: --> 468 return parser.read(nrows) 469 470

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 1055 def read(self, nrows=None): 1056 nrows = validate_integer("nrows", nrows) -> 1057 index, columns, col_dict = self._engine.read(nrows) 1058 1059 if index is None:

~\anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 2059 def read(self, nrows=None): 2060 try: -> 2061 data = self._reader.read(nrows) 2062 except StopIteration: 2063 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.TextReader._read_rows()

pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader._tokenize_rows()

pandas_libs\parsers.pyx in pandas._libs.parsers.raise_parser_error()

ParserError: Error tokenizing data. C error: Expected 20 fields in line 46, saw 33``

TheInsightsBuilder avatar Nov 26 '21 00:11 TheInsightsBuilder