Merge branch 'master' into fix-split-bug

This commit is contained in:
Vinayak Mehta
2019-04-20 21:06:47 +05:30
committed by GitHub
4 changed files with 35 additions and 1 deletions
+7
View File
@@ -329,6 +329,13 @@ class Table(object):
def __repr__(self):
return '<{} shape={}>'.format(self.__class__.__name__, self.shape)
def __lt__(self, other):
if self.page == other.page:
if self.order < other.order:
return True
if self.page < other.page:
return True
@property
def data(self):
"""Returns two-dimensional list of strings in table.
+1 -1
View File
@@ -161,4 +161,4 @@ class PDFHandler(object):
t = parser.extract_tables(p, suppress_stdout=suppress_stdout,
layout_kwargs=layout_kwargs)
tables.extend(t)
return TableList(tables)
return TableList(sorted(tables))