Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-picks from: https://github.com/foarsitter/camelot/pull/72
Below is documentation on each of the changes
core.py
:*
Table.to_excel
method bug-fix: With the installed version ofpandas
inpypdf_table_extraction
, thepd.ExcelWriter
object no longer has awrite
method. I've updated this method accordingly to write the file in the recommended manner.camelot
package left a lot to be desired. My personal use case made theTable
andTableList
objects most important, so I've added type hinting to these methods that enable type checkers and linters to provide useful hints when using these objects or functions that return them. For example, I used to get linting errors about iterating through aTableList
, whereas now I don't! The linter is also able to tell that the objects within the iterable areTable
s. Just a small QOL change that went a long way in my use-case, and likely will for others.lattice.py
:indices
has elements: This is a small but mighty change! We found errors consistently at this line. After returning fromlattice.get_table_index
, there is no check for whether theindices
list has any elements. This slight modification does the indices reduction if theindices
list has no elements.