Catching Merged and Split Rows When Converting Bank Statement PDFs to Excel

Converting bank statement PDFs to Excel often produces structural errors, most commonly split rows where wrapped descriptions or amounts land on separate lines, and merged rows where two transactions with tight spacing are read as one. The article describes a two-pass approach: a cleaning pass that removes page furniture such as page numbers and repeated headers, then folds wrapped text and split amounts back into their transactions. A second pass checks each row against the statement's running balance, flagging rows where the printed balance does not match the previous balance plus the amount. Descriptions containing a second date token are treated as likely merged transactions. The author provides a runnable Python implementation of both passes, and notes that the author works on a commercial statement converter.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in