Advertisement
g96

Untitled

g96
Feb 22nd, 2022
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.30 KB | None | 0 0
  1. Traceback (most recent call last):
  2.   File "C:\Users\gobro7\Desktop\Autoreport\rename.py", line 45, in <module>
  3.     df = pd.read_csv('1.txt', sep='|', engine='python').replace(' ', '', regex=True).drop(columns=lambda df: df.columns[[0, 1, 2, 4]])
  4.   File "C:\Users\gobro7\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers.py", line 610, in read_csv
  5.     return _read(filepath_or_buffer, kwds)
  6.   File "C:\Users\gobro7\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers.py", line 468, in _read
  7.     return parser.read(nrows)
  8.   File "C:\Users\gobro7\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers.py", line 1057, in read
  9.     index, columns, col_dict = self._engine.read(nrows)
  10.   File "C:\Users\gobro7\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers.py", line 2496, in read
  11.     alldata = self._rows_to_cols(content)
  12.   File "C:\Users\gobro7\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers.py", line 3189, in _rows_to_cols
  13.     self._alert_malformed(msg, row_num + 1)
  14.   File "C:\Users\gobro7\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\io\parsers.py", line 2948, in _alert_malformed
  15.     raise ParserError(msg)
  16. pandas.errors.ParserError: Expected 1 fields in line 4, saw 55
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement