May-23-2019, 12:43 PM
Hi.
I would like help to:
1-I need know why I cannot read a text file with pandas.
2-If possible read this file, get all rows that have C100 value and insert into new xls file.
Size file is 12MB
Link to my file:
https://drive.google.com/file/d/1MfkVJtb...sp=sharing
I would like help to:
1-I need know why I cannot read a text file with pandas.
2-If possible read this file, get all rows that have C100 value and insert into new xls file.
Size file is 12MB
Link to my file:
https://drive.google.com/file/d/1MfkVJtb...sp=sharing
import pandas as pd df = pd.read_csv("01Sped.txt", sep = "|", header=None) print(df)Erro:
Error:Traceback (most recent call last):
File "C:\Users\user\Downloads\readTxtFile.py", line 3, in <module>
df = pd.read_csv("01Sped.txt", sep = "|", header=None)
....................
File "pandas\_libs\parsers.pyx", line 899, in pandas._libs.parsers.TextReader.read
File "pandas\_libs\parsers.pyx", line 914, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas\_libs\parsers.pyx", line 968, in pandas._libs.parsers.TextReader._read_rows
File "pandas\_libs\parsers.pyx", line 955, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas\_libs\parsers.pyx", line 2172, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 17 fields in line 12001, saw 31
Thank you!!