Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
edited by

I am having one pdf file and want to transform it into excel and want to store it locally through python. I have used the below code for converting the file but I am not able to save it, kindly guide me on how I can save the file?

df = ("./Downloads/folder/myfile.pdf")

tabula.convert_into(df, "test.csv", output_format="csv", stream=True)

1 Answer

0 votes
by (108k points)

Your code is fine. For saving your file locally, you can define your whole output path instead of only passing the name of the file 'output.csv':

df = ("./Downloads/folder/myfile.pdf")

output = "./Downloads/folder/test.csv"

tabula.convert_into(df, output, output_format="csv", stream=True)

For more information regarding the same, do refer the Python certification course that will help you out in a better way.

Related questions

0 votes
1 answer
asked Dec 3, 2020 in Python by ashely (50.2k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...