Skip to content

Commit 6514236

Browse files
authored
dataprep: return same type of data in get_tables_result (#1696)
Return the same type of data in get_tables_result() to fix issue #1695 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
1 parent fd7b6b7 commit 6514236

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

comps/dataprep/src/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,13 +736,13 @@ def parse_html_new(input, chunk_size, chunk_overlap):
736736

737737
def get_tables_result(pdf_path, table_strategy):
738738
"""Extract tables information from pdf file."""
739+
tables_result = []
739740
if table_strategy == "fast":
740-
return None
741+
return tables_result
741742

742743
from unstructured.documents.elements import FigureCaption
743744
from unstructured.partition.pdf import partition_pdf
744745

745-
tables_result = []
746746
raw_pdf_elements = partition_pdf(
747747
filename=pdf_path,
748748
infer_table_structure=True,

0 commit comments

Comments
 (0)