diff --git a/pdfplumber/table.py b/pdfplumber/table.py index f189742e..ebb09a93 100644 --- a/pdfplumber/table.py +++ b/pdfplumber/table.py @@ -395,21 +395,15 @@ def char_in_bbox(char, bbox): row_chars = [char for char in chars if char_in_bbox(char, row.bbox)] for cell in row.cells: - if cell is None: - cell_text = None - else: - cell_chars = [ - char for char in row_chars if char_in_bbox(char, cell) - ] - - if len(cell_chars): - cell_text = utils.extract_text( - cell_chars, - x_tolerance=x_tolerance, - y_tolerance=y_tolerance, - ).strip() - else: - cell_text = "" + cell_chars = [char for char in row_chars if char_in_bbox(char, cell)] + + cell_text = "" + if len(cell_chars): + cell_text = utils.extract_text( + cell_chars, + x_tolerance=x_tolerance, + y_tolerance=y_tolerance, + ).strip() arr.append(cell_text) table_arr.append(arr)