troubleshooting Question

Python Selenium and Pandas question

Avatar of Hiro 714
Hiro 714 asked on
10 Comments6 Solutions21 ViewsLast Modified:
When I append, only original df_data appears and unable to append df_data1.
Please advise.

Ticket_List = []
Ticket_Titles = driver.find_elements_by_xpath('//tbody/tr/td[2]/a')
Ticket_Discriptions = driver.find_elements_by_xpath('//tbody/tr/td[3]/a')
Ticket_Status = driver.find_elements_by_xpath('//tbody/tr/td[4]/a')
Ticket_Titles = Ticket_Titles[4:]
Ticket_List = []
for i in range(len(Ticket_Titles)):
    temporary_data={'Number': Ticket_Titles[i].text,
                   'Titles': Ticket_Discriptions[i].text,
                   'Status': Ticket_Status[i].text
df_data = pd.DataFrame.from_dict(Ticket_List)
Ticket_Titles1 = driver.find_elements_by_xpath('//tbody/tr/td[2]/a')
Ticket_Discriptions1 = driver.find_elements_by_xpath('//tbody/tr/td[3]/a')
Ticket_Status1 = driver.find_elements_by_xpath('//tbody/tr/td[4]/a')

Ticket_Titles1 = Ticket_Titles1[4:]

Ticket_List1 = []
for i in range(len(Ticket_Titles1)):
    temporary_data1={'Number': Ticket_Titles1[i].text,
                   'Titles': Ticket_Discriptions1[i].text,
                   'Status': Ticket_Status1[i].text
df_data1 = pd.DataFrame.from_dict(Ticket_List1)

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 6 Answers and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 6 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros