Created
August 10, 2021 07:45
-
-
Save ceaksan/25034d9bd4496ea953082d2cfa831ad1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!pip install PyPDF2 | |
import urllib.request, io, PyPDF2 | |
import pandas as pd | |
url = "https://fenbil.aku.edu.tr/FENBILENS/takvim/2014-2022-1RESMI.pdf" | |
remoteFile = urllib.request.urlopen(url) | |
pdfReader = PyPDF2.PdfFileReader(io.BytesIO(remoteFile.read())) | |
for i in range(pdfReader.numPages): | |
with open('pdf.txt', 'a+') as file: | |
file.write(pdfReader.getPage(i).extractText()) | |
df = pd.read_csv('/content/pdf.txt', delimiter = "\n", names=['date']) | |
df.head() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment