Skip to content

Instantly share code, notes, and snippets.

View boiboi796's full-sized avatar

danzcoded boiboi796

  • university of Ibadan
View GitHub Profile
@boiboi796
boiboi796 / pdf table extractor.py
Last active November 28, 2025 03:41
Do you know you can extract any pdf table with python?
import pdfplumber, pandas as pd
def pdf_to_excel(pdf_path:str,storage:str,columns:list,total_column:int):
try:
# Container for all student records
all_rows = []
# Expected number of columns
expected_cols = total_column #you can change the number of cols
# Use pdfplumber to open the PDF