From 9684688f59270a5a4b30f3cf098b9b8dc7618438 Mon Sep 17 00:00:00 2001 From: gzm1 <42786351+gzm1@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:53:03 -0600 Subject: [PATCH] join_tables.ipynb - fix: correct logic check for empty tables fix: correct logic check for empty tables Changed `if len(tabs.tables) == []` to `if tabs.tables == []` to fix incorrect comparison between length and empty list --- table-analysis/join_tables.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table-analysis/join_tables.ipynb b/table-analysis/join_tables.ipynb index 55ac405..f5eb71f 100644 --- a/table-analysis/join_tables.ipynb +++ b/table-analysis/join_tables.ipynb @@ -290,7 +290,7 @@ "\n", "for page in doc: # iterate over the pages\n", " tabs = page.find_tables() # locate tables on page\n", - " if len(tabs.tables) == []: # no tables found?\n", + " if tabs.tables == []: # no tables found?\n", " break # stop\n", " tab = tabs[0] # assume fragment to be 1st table\n", " dataframes.append(tab.to_pandas()) # append this DataFrame\n",