camelot-dev / camelot-dev/camelot

not able to identify dataframe from bank statements pdf

Open
#357 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.8k
Forks
546
Avg merge
3d 17h
Merged PRs (30d)
3

Description

tabula and camelot both are not able to extract tables from bank statements pdf like the one sample attached
1) the area for the table is not fixed i.e. co-ordinates are changed for every months statement
2) lattice and stream mode both not working and gives always empty dataframe with column names
C:\Users\vikas\Desktop\GreenariaSociety\Tools>python sample.py

Empty DataFrame
Columns: [DATE, MODE, PARTICULARS, DEPOSITS, WITHDRAWALS, BALANCE]
Index: []
3) also in case some columns are having multiple lines in the values for e.g. PARTICULARS/DESCRIPTIONS from bank statements the table cell data is not correctly extracted and it is spread across other cells/rows

sample code used as below:-
df = tabula.read_pdf(pdf_path, pages="1",stream=True,multiple_tables=True)[0] #//tried lattice, pages='all', etc.
print(type(df))
print(df)

[sample_bank_statement.pdf](https://github.com/camelot-dev/camelot/files/10887805/sample_bank_statement.pdf)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the report with sample_bank_statement.pdf and the shown tabula.read_pdf call, then compare stream and lattice results. Investigate why the dataframe is empty and how multiline PARTICULARS or DESCRIPTIONS values are split across rows and cells. Done means the behavior and expected extraction are covered for the supplied bank-statement sample.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.