error_bad_lines : boolean, default True
Lines with too many fields (e.g. a csv line with too many commas) will by default cause an exception to be raised, and no DataFrame will be returned. If False, then these “bad lines” will dropped from the DataFrame that is returned. (Only valid with C parser)
见documentation
将
error_bad_lines
设置为False
:将
^{pr2}$warn_bad_lines
设置为True
:这将为
dataframe
上的每一个错误行输出一个警告,而不是忽略它的存在或根本不返回dataframe
相关问题 更多 >
编程相关推荐