import pdfplumber def extract_data(feed): data = [] with pdfplumber.load(feed) as pdf: pages = pdf.pages for p in pages: data.append(p.extract_tables()) return None # build more code to return a dataframe if __name__ : "__main__": extract_data()