I am trying to extract only tables from pdf using tabula package and writing the output into csv, Unfortunately, the below code gives me an error as "NameError: name 'tabula' is not defined"
How to fix this issue
Code:
!pip install tabula-py
from tabula import read_pdf
from tabula.io import read_pdf
file = r"url"
df = read_pdf(file, pages='all')
tabula.to_csv('output.csv', encoding='utf-8')
Error:
"NameError: name 'tabula' is not defined"