Skip to content

Commit 1041816

Browse files
committed
add pdf
1 parent 9281cb8 commit 1041816

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

pdf/01.png

115 KB
Loading

pdf/02.png

78 KB
Loading

pdf/03.png

52.5 KB
Loading

pdf/04.png

73.9 KB
Loading

pdf/pdf.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python3
2+
3+
import pdfplumber
4+
import pandas as pd
5+
6+
with pdfplumber.open("test.pdf") as pdf:
7+
first_page = pdf.pages[0]
8+
text = first_page.extract_text()
9+
print(text)
10+
11+
second_page = pdf.pages[1]
12+
table = second_page.extract_tables()
13+
for t in table:
14+
df = pd.DataFrame(t[1:],columns=t[0])
15+
print(df)
16+

pdf/test.pdf

88 KB
Binary file not shown.

0 commit comments

Comments
 (0)