Python Forum
How to switch table area coordinates in Python Camelot and Tabula-Py
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to switch table area coordinates in Python Camelot and Tabula-Py
#1
Dear All,

I have obtained the coordinates of a table bounding box using Camelot, but I need to use tabula-py to extract the table data, as camelot is only extracting the first line in each table cell, even in lattice mode. I have noticed that when defining the same table region in tabula-py, 2 of the resulting coordinates are largely different form the camelot values (shown in the code sample below). Whilst the 2nd and 4th values in tabula are similar to 1st and third values in camelot, the others are largely different, how can I translate these readings from the camelot values please? I have been trying to use proportion, and to add and subtract values but all were in vain...

df= tabula.read_pdf(pdf_path, lattice=True, area=(71, 627, 325, 1160), pages=page)

#but camelot coordinate values from bounding box are: 631, 518, 1154, 765
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Camelot not able to change column header shortmeister1 2 790 Mar-22-2025, 04:47 AM
Last Post: Pedroski55
  Error Calculating Circle Area in Python aaronramsdale 1 1,005 Jun-04-2024, 07:57 AM
Last Post: Pedroski55
  python basemap, cant show the right coordinates dbsr 0 1,409 Jun-08-2022, 01:55 PM
Last Post: dbsr
  best way to use switch case? korenron 8 4,335 Aug-18-2021, 03:16 PM
Last Post: naughtyCat
  tabula-py, how to preserve a read_pdf() format and export to csv abcoelho 2 4,925 Mar-24-2021, 08:34 PM
Last Post: abcoelho
  issue with Tabula-py, pyinstaller and java maurom82 2 4,256 Feb-19-2021, 04:32 PM
Last Post: buran
  running python script showing an icon in the tray notification area chubbychub 1 6,420 Nov-01-2020, 03:52 PM
Last Post: jefsummers
  "Switch-to-spreadsheet" entry. Feasible in Python? whatspython 2 2,704 Sep-30-2020, 01:12 PM
Last Post: buran
  How do I do this? Switch Case? mstichler 4 3,637 Jun-05-2020, 10:27 AM
Last Post: snippsat
  How to use switch/case in python? newbieguy 9 5,838 Nov-08-2019, 11:35 AM
Last Post: newbieguy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020