This commit is contained in:
12
docs/snippets/python/utils/tables.md
Normal file
12
docs/snippets/python/utils/tables.md
Normal file
@@ -0,0 +1,12 @@
|
||||
```python title="Python"
|
||||
from kreuzberg import extract_file_sync, ExtractionConfig, ExtractedTable
|
||||
|
||||
result = extract_file_sync("document.pdf", config=ExtractionConfig())
|
||||
|
||||
for table in result.tables:
|
||||
row_count: int = len(table.cells)
|
||||
print(f"Table with {row_count} rows")
|
||||
print(table.markdown)
|
||||
for row in table.cells:
|
||||
print(row)
|
||||
```
|
||||
Reference in New Issue
Block a user