[782]AttributeError: module 'tabula' has no attribute 'read_pdf'

2020-03-28 19:43:29 浏览数 (1)

代码语言:javascript复制
from tabula import read_pdf

报错:ImportError: cannot import name ‘read_pdf’

解决:

代码语言:javascript复制
pip uninstall tabula
pip3 install tabula-py
代码语言:javascript复制
import tabula
# Read pdf into DataFrame
df = tabula.read_pdf("./P26.pdf",pages=str(1))
代码语言:javascript复制
from tabula import wrapper
df = wrapper.read_pdf('my_pdf')

0 人点赞