How to Get Extracted Data into pandas
Skip writing a custom PDF or OCR parser. Extract the document with Datafromfile, then load the result straight into a pandas DataFrame.
More from this article
- Need to import data into pandas from a PDF, scanned document, or photo? pandas can't read a PDF, a scanned document, or a photo directly, there's no pd.read_pdf(). Datafromfile handles that conversion; pandas takes it from there.
- The actual steps
- 1. Extract your document with Datafromfile and export it as CSV, XLSX, or JSON. 2. Load it with pandas:
- ```python import pandas as pd
- From CSV df = pd.read_csv("extracted-data.csv")
- From Excel df = pd.read_excel("extracted-data.xlsx")