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
  python basemap, cant show the right coordinates dbsr 0 943 Jun-08-2022, 01:55 PM
Last Post: dbsr
  best way to use switch case? korenron 8 2,934 Aug-18-2021, 03:16 PM
Last Post: naughtyCat
  tabula-py, how to preserve a read_pdf() format and export to csv abcoelho 2 3,237 Mar-24-2021, 08:34 PM
Last Post: abcoelho
  issue with Tabula-py, pyinstaller and java maurom82 2 3,126 Feb-19-2021, 04:32 PM
Last Post: buran
  running python script showing an icon in the tray notification area chubbychub 1 4,476 Nov-01-2020, 03:52 PM
Last Post: jefsummers
  "Switch-to-spreadsheet" entry. Feasible in Python? whatspython 2 1,979 Sep-30-2020, 01:12 PM
Last Post: buran
  How do I do this? Switch Case? mstichler 4 2,502 Jun-05-2020, 10:27 AM
Last Post: snippsat
  How to use switch/case in python? newbieguy 9 3,961 Nov-08-2019, 11:35 AM
Last Post: newbieguy
  What area unit the opposite ways in which to understand if an inventory in Python is Smhbugra 2 2,430 May-27-2019, 07:55 PM
Last Post: Larz60+
  switch limitations MuntyScruntfundle 3 2,338 Jan-27-2019, 06:11 PM
Last Post: aakashjha001

Forum Jump:

User Panel Messages

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