我正在使用tabula-py读取pdf文件,该表使用pandas DataFrame作为输出。但是我需要指定两个DataFrame分隔符:\r
和,
costs = tabula.read_pdf(
url,
pages=1,
pandas_options=dict(
names=columns,
sep=r'\r|,',
engine='python'
)
)
出现此错误:
CSVParseError: Error failed to create DataFrame with different column tables.
Try to set `multiple_tables=True`or set `names` option for `pandas_options`.
, caused by ParserError('Expected 3 fields in line 7, saw 9. Error could possibly be due to quotes being ignored when a multi-char delimiter is used.')