簡體   English   中英

在python中使用tabula讀取pdf文件

[英]Reading pdf file using tabula in python

我正在嘗試在 python 中使用 tabula 讀取 pdf 文件,但收到這些錯誤,這是代碼。我使用的是 python 3.7 版和 tabula 2.0.1 版

from tabula import read_pdf
df=read_pdf('txt.pdf',pages='all')
print(df)

這些是我收到的錯誤

    Python37_64\lib\site-packages\tabula\io.py", line 85, in _run
    check=True, 

    Python37_64\lib\subprocess.py", line 488, in run
    with Popen(*popenargs, **kwargs) as process:

    Python37_64\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)

做這樣的事情

from tabula import read_pdf
df=read_pdf('txt.pdf',pages='all')
df

或者

from tabula import read_pdf
df=read_pdf('txt.pdf',pages='all')
df[0]

你會很高興去的

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM