Created
December 11, 2018 14:16
-
-
Save vinayak-mehta/8a3bf37350b241b966483d202a5109b9 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
import os | |
import sys | |
import pandas as pd | |
import pdfplumber | |
pdf = pdfplumber.open(sys.argv[1]) | |
p0 = pdf.pages[0] | |
table = p0.extract_table() | |
print table | |
df = pd.DataFrame(table) | |
df.to_csv(os.path.splitext(sys.argv[1])[0] + '.csv', index=False, quoting=1, encoding='utf-8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment