Quite new to python and trying to learn from different forums and such. I am scraping using selenium and this time i wanted to get a table. The scraping and the output works fine.But i would like to get titles as columns and the tr value as the row.. today my output looks like this
but i want the output like this..
This is the code
# Import Library
from selenium import webdriver
import pandas as pd
# Open Browser
driver = webdriver.Chrome(path')
# Get the URL
url = 'give url'
driver.get(url)
driver.maximize_window()
# Read and Convert Web table into data frame
webtable_df = pd.read_html(driver.find_element_by_xpath('').get_attribute('outerHTML'))[0]
# Write() to excel file
webtable_df.to_excel (r'path', index = False, header=True)

