Using Tabula library in Python extract multiple tables from the financial report and save each table in a separate csv file

 Using Tabula library in Python  extract multiple tables from the financial report and save each table in a separate csv file.


step-1

jre is  required to run tabula 

step-2

install jre  ->set path and then restart jupyter

step-3

pip install tabula-py

step-4

import tabula

df=tabula.read_pdf(r"C:\Users\darsh\OneDrive\Desktop\ML\2\ML_Practical_2_1.pdf",pages="all",stream="true")
count=0
print(df)
for i in df:
    i.to_csv('ML_Practical_2_1'+str(count)+'.csv', index=False)
    count+=1


step-5





Comments