Skip to content

Commit b5d07b2

Browse files
authored
fix: fix non-string table cell handling in chunker (#58)
Signed-off-by: Panos Vagenas <[email protected]>
1 parent bdc8793 commit b5d07b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docling_core/transforms/chunker/hierarchical_chunker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ def _triplet_serialize(cls, table_df: DataFrame) -> str:
129129
table_df.index = table_df.index + 1
130130
table_df = table_df.sort_index()
131131

132-
rows = [item.strip() for item in table_df.iloc[:, 0].to_list()]
133-
cols = [item.strip() for item in table_df.iloc[0, :].to_list()]
132+
rows = [str(item).strip() for item in table_df.iloc[:, 0].to_list()]
133+
cols = [str(item).strip() for item in table_df.iloc[0, :].to_list()]
134134

135135
nrows = table_df.shape[0]
136136
ncols = table_df.shape[1]

0 commit comments

Comments
 (0)