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