Wenn ich dieses Skript ausführen, funktioniert es nicht und ich weiß nicht warum. Kannst du mir helfen?Fehler mit Pandas: pandas.io.common.CParserError: Fehler Tokening Daten
import pandas as pd
data1 = pd.read_csv(url)
print(data1)
Fehler:
Traceback (most recent call last):
File "C:\Users\abc\Desktop\script.py", line 4, in <module>
data1 = pd.read_csv(url)
File "C:\Users\abc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 646, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\abc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 401, in _read
data = parser.read()
File "C:\Users\abc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 939, in read
ret = self._engine.read(nrows)
File "C:\Users\abc\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 1508, in read
data = self._reader.read(nrows)
File "pandas\parser.pyx", line 848, in pandas.parser.TextReader.read (pandas\parser.c:10415)
File "pandas\parser.pyx", line 870, in pandas.parser.TextReader._read_low_memory (pandas\parser.c:10691)
File "pandas\parser.pyx", line 924, in pandas.parser.TextReader._read_rows (pandas\parser.c:11437)
File "pandas\parser.pyx", line 911, in pandas.parser.TextReader._tokenize_rows (pandas\parser.c:11308)
File "pandas\parser.pyx", line 2024, in pandas.parser.raise_parser_error (pandas\parser.c:27037)
pandas.io.common.CParserError: Error tokenizing data. C error: Expected 45 fields in line 49, saw 46
Vielen Dank!
Was ist ein Separator? – jezrael
Was ist die URL? Wie sehen die Daten aus? Sie erwarten wirklich, dass andere helfen, wenn so wenig Informationen zur Verfügung gestellt werden? – Yorian
@ Yorian sie sind vertrauliche Daten. Ich kann dir die URL nicht geben. –