TableChef
is a versatile chef that extracts and processes tables from multiple sources. It can read CSV and Excel files, convert them to markdown format, or extract tables from markdown text. The parsed tables are returned in a structured format ready for downstream processing.
Installation
TableChef requires thepandas
library for processing CSV and Excel files.
For more installation options, see the Installation
Guide.
Initialization
Methods
process()
Process a file or markdown string to extract tables.Parameters
Can be a file path (CSV/Excel) or a markdown string containing tables
Returns
List[MarkdownTable] | None
A list of
MarkdownTable
objects. None
if no tables are foundprocess_batch()
Process multiple files or markdown strings at once.Parameters
List of file paths or markdown strings to process
Returns
List[MarkdownTable] | None
A list of
MarkdownTable
objects. None
if no tables are foundUsage
Supported File Formats
- CSV files (
.csv
) - Comma-separated values - Excel files (
.xls
,.xlsx
) - Microsoft Excel spreadsheets - Markdown strings - Text containing pipe-separated tables