>
The table-extractor skill is designed to efficiently extract and structure tables from PDF documents, addressing the common challenge of dealing with complex table layouts in PDFs. Many PDFs contain tables that are either borderless, span multiple pages, or include merged cells, making manual extraction tedious and error-prone. This skill leverages camelot, a robust Python library, to parse tables accurately, transforming them into structured data formats such as pandas DataFrames for further analysis or conversion into Excel and other formats.
Key features include precise table extraction using two primary methods: lattice, which detects tables with visible borders, and stream, which analyzes text positioning for borderless tables. Users can specify page ranges, single pages, or all pages for extraction. Advanced options allow handling of merged cells, text alignment adjustments, splitting text at newlines, and defining specific table areas or column positions. These capabilities ensure flexibility for a variety of PDF layouts and complexities, providing high fidelity in the extracted data.
This skill is particularly useful for data analysts, researchers, accountants, and anyone who regularly works with tabular data in PDFs. It simplifies workflows by automating extraction, reducing manual data entry, and ensuring consistent formatting. Typical use cases include extracting financial tables from reports, converting survey results or scientific data into analyzable formats, and migrating tabular content from PDFs to spreadsheets for reporting or visualization.
You can specify the pages during extraction using camelot's pages parameter. For example, 'pages="1"' extracts from the first page, 'pages="1,3,5"' for multiple pages, 'pages="1-5"' for a range, or 'pages="all"' to extract tables from all pages.
The recommended models are claude-sonnet-4 and claude-opus-4. It is also compatible with claude-3-5-sonnet, gpt-4, and gpt-4o.
Yes, using the 'stream' extraction method, the skill can detect and extract borderless tables by analyzing text positioning rather than relying on visible table borders.
This skill relies on Python, specifically using the camelot library to perform table extraction and convert results into pandas DataFrames.
Yes, you can define table areas using coordinates in PDF points. Multiple areas can be specified, and column positions can be manually set for stream extractions.
Quick Setup:
.claude/skills/Repository
claude-office-skills/skills