Python Forum
How read Table Structure from Database
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How read Table Structure from Database
#5
Hi All...
I am trying to make a list from the table values I retrieved using below method
Code:

tabledata=browser.get_table_data("Xpath__//div[@class='col-md-12 hui-display']/div/div")
#print("printing table data")
#print(tabledata)
if(len(tabledata)>0):
import pandas as pd
pd.set_option('display.max_columns',None)
table_df=pd.DataFrame(tabledata)
print("printing the data frame")
print(table_df)

I am getting data in a not so defined formatt

How do I get data from a table with all the header and keep it in a list to compare it with my test data. Please help me out understand this
Reply


Messages In This Thread
RE: How read Table Structure from Database - by hemasri - Oct-25-2019, 09:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pymodbus read and save to database stewietopg 3 2,013 Mar-02-2023, 09:32 AM
Last Post: stewietopg
  Read JSON via API and write to SQL database TecInfo 5 2,471 Aug-09-2022, 04:44 PM
Last Post: TecInfo
  SaltStack: MySQL returner save less data into Database table columns xtc14 2 2,257 Jul-02-2021, 02:19 PM
Last Post: xtc14
  Yahoo_fin, Pandas: how to convert data table structure in csv file detlefschmitt 14 8,108 Feb-15-2021, 12:58 PM
Last Post: detlefschmitt
  Looping to read data in database CEC68 1 1,795 Sep-24-2020, 08:54 PM
Last Post: scidam
  Database structure (no code?) BlackmoreSteve620721 1 1,908 Apr-13-2020, 10:39 PM
Last Post: Larz60+
  MYSQL how to assign a table for each user in my username table database? YoshikageKira 1 2,901 Dec-26-2019, 05:57 AM
Last Post: buran
  Database table structure compare(Oracle) GKT 4 2,932 Oct-16-2019, 03:16 PM
Last Post: GKT
  Check table exists in Database ARV 0 2,030 Oct-03-2019, 02:37 PM
Last Post: ARV
  How do i read particular text from text file and update those values in MS SQL table ganeshsai2912 33 15,541 Nov-20-2018, 12:55 AM
Last Post: ganeshsai2912

Forum Jump:

User Panel Messages

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