处理 read_csv 报错 OSError:Initializing from file failed

df = pd.read_csv(r'path to file')

报错:

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

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

OSError: Initializing from file failed

解决方案:

pd.read_csv("your_file.txt", engine='python')

参考:

OSError: Initializing from file failed on csv in Pandas

출처: http://kkckc.tistory.com/187 [kkckc의 일상]
解决pandas.read_csv()出现OSError:Initializing from file failed问题

你可能感兴趣的:(处理 read_csv 报错 OSError:Initializing from file failed)