Skip to content

Commit 0512f44

Browse files
authored
fix: add doc param to all export_to_dataframe() calls (#380)
* fix: add 'doc' to all export_to_dataframe calls * DCO Remediation Commit for Viroshaan <[email protected]> I, Viroshaan <[email protected]>, hereby add my Signed-off-by to this commit: 10317f8 Signed-off-by: Viroshaan <[email protected]> --------- Signed-off-by: Viroshaan <[email protected]>
1 parent 2dc57c1 commit 0512f44

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docling_core/transforms/chunker/hierarchical_chunker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def serialize(
145145
parts.append(cap_res)
146146

147147
if item.self_ref not in doc_serializer.get_excluded_refs(**kwargs):
148-
table_df = item.export_to_dataframe()
148+
table_df = item.export_to_dataframe(doc)
149149
if table_df.shape[0] >= 1 and table_df.shape[1] >= 2:
150150

151151
# copy header as first row and shift all rows by one

test/test_docling_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ def _test_export_methods(
734734
for table in doc.tables:
735735
table.export_to_markdown()
736736
table.export_to_html(doc)
737-
table.export_to_dataframe()
737+
table.export_to_dataframe(doc)
738738
table.export_to_doctags(doc)
739739

740740
# Test Images export ...

0 commit comments

Comments
 (0)