环境安装:

pip install tabula-py

 

代码如下:

import tabula

df = tabula.read_pdf("111.pdf", encoding='utf-8', pages='all')
# print(type(df))

for indexs in df.index:
    print(df.loc[indexs].values)

输出结果如下:

使用tabula处理pdf

切记,一定要安装pip install tabula-py

而不是:pip install tabula

否则会出现一大堆的No name ------

搞了一早上,才有的数据!

相关文章:

  • 2021-12-11
  • 2021-10-01
  • 2021-07-19
  • 2022-12-23
  • 2021-06-29
猜你喜欢
  • 2021-10-21
  • 2021-10-18
  • 2022-12-23
  • 2021-09-20
  • 2021-09-17
  • 2021-10-21
  • 2022-12-23
相关资源
相似解决方案