
Simply add your Java installation folder to the PATH variable. Which is due to Java folder is not in the PATH system variable.

If this is your first time installing Java and tabula-py, you might get the following error message when running the above 2 lines of code: : `java` command is not found from this Python process.Please ensure Java is installed and PATH is set for `java` import tabulaĭf = tabula.read_pdf('data.pdf', pages = 3, lattice = True) Thus we specify that we want to get the second element of that list using. For some reason, tabula detected 8 tables on this page, looking through them, we see that the second table is what we want to extract. tabula.read_pdf() returns a list of dataframes.

We are going to extract the table on page 3 of the PDF file. Once you have Java, install tabula-py with pip: pip install tabula-py The installation takes about 1 minute, and you can follow this link to find the Java installation file for your operating system. It means that we need to install Java first. Tabula-py is a Python wrapper of tabula-java, which can read tables in PDF file.

COVID-19 cases by country Download Step 1.
