i tried to extract the tables from a pdf using camelot but it is showing this error message!
import camelot
tables = camelot.read_pdf("C:/Users/shres/Desktop/PY/Arun District Council_ASR-2019.pdf", pages='all')
tables
tables.export("test.csv", f='csv')
tables[0]
tables[0].parsing_report
{
'accuracy' : 99.02,
'whitespace':12.24,
'order': 1,
'page' : 1
}
tables[0].to_csv('test.csv')
tables[0].df
******error: the code shows this error******
ImportError: cannot import name 'TableList' from 'camelot.core' (C:\Users\shres\AppData\Local\Programs\Python\Python38\lib\site-packages\camelot\core\__init__.py)
you might want to reinstall it. Camelot and camelot-py are two different packages but they have the same import name.
pip uninstall camelot
pip uninstall camelot-py
pip install camelot-py[cv]
It will also generate the same problem for me and I know that it is too late but maybe the same thing will happen to other people and as I managed to solve it, it was git cloning the repo and then inside the camelot street I installed the cv with pip install like this:
pip install "camelot-py [cv]"
git clone https://www.github.com/camelot-dev/camelot
cd camelot
pip install ".[cv]"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With