项目地址:https://github.com/camelot-dev/camelot
>>> import camelot
>>> tables = camelot.read_pdf( foo.pdf ) #类似于Pandas打开CSV文件的形式
>>> tables[0].df # get a pandas DataFrame!
>>> tables.export( foo.csv , f= csv , compress=True) # json, excel, html, sqlite,可指定输出格式
>>> tables[0].to_csv( foo.csv ) # to_json, to_excel, to_html, to_sqlite, 导出数据为文件
>>> tables
<TableList n=1>
>>> tables[0]
<Table shape=(7, 7)> # 获得输出的格式
>>> tables[0].parsing_report
{
accuracy : 99.02,
whitespace : 12.24,
order : 1,
page : 1
}
conda install -c conda-forge camelot-py
pip install camelot-py[cv]
git clone https://www.github.com/camelot-dev/camelot
cd camelot
pip install ".[cv]"
朋友会在“发现-看一看”看到你“在看”的内容