【Online Courses】
⚡Getting Started with Stata: (24 lectures + 4 assignments = 5.5 hours content): available on Udemy: https://www.udemy.com/course/getting-...
⚡Applied Time Series using Stata (29 lectures + 4 assignments = 6.5 hours content): available on Udemy: https://www.udemy.com/course/applied-...
This is a detailed step-by-step guide that develops a Python code to extract information from PDF files. This is very useful if you have to handle a large number of files. The Python code returns the number of all search term occurrences in the document and identifies the page numbers. All material including the code is on GitHub https://github.com/GerhardKling/DataW...
I introduce the PyPDF2 package, which we need to install.
Installation on Anaconda:
conda install -c conda-forge pypdf2
Installation using the pip installer:
pip install PyPDF2
I show you how to create and activate a virtual environment (which is optional – but useful to do). Then we develop the code step-by-step. This will enable you to learn how to modify the code to suit your specific requirements. Please leave a comment if you have any questions.
Finally, we will refactor the code. We define a function that takes a search term and filename and returns a tuple containing the total number of occurrences and the number of pages that contain the search term at least once.
Chapters
0:00 Welcome
0:15 Return all occurrences & page numbers
0:44 Example PDF
2:23 Python setup
3:55 Virtual environment
6:16 Coding fun
28:05 Refactoring
The channel
YUNIKARN focuses on publishing educational content in applied statistics, mathematics, and data science. In these fields, programming skills have become essential. Hence, we cover various programming languages including Python, Stata, and C++ to tackle problems and for fun.
Stay in touch
Please leave comments or follow us on Twitter ( / gerhardklings . DMs are open.
Hashtags
#datascience #python #PDF
On this page of the site you can watch the video online Extracting data from PDF files using Python with a duration of hours minute second in good quality, which was uploaded by the user YUNIKARN 11 February 2022, share the link with friends and acquaintances, this video has already been watched 49,930 times on youtube and it was liked by 610 viewers. Enjoy your viewing!