Python Forum
Trying to Tabulate Information from an Aircraft Website Link(s)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to Tabulate Information from an Aircraft Website Link(s)
#33
(Jun-23-2019, 08:58 PM)eddywinch82 Wrote: But the format is different, to the previous BBMF Year Schedules. Can you look at the Webpage, and suggest to me, what I need to change in my Code
You have to look at the source code of new site an make changes.
Should keep away from new task in this Thread as it already long,and you most try yourself and post code.
So a last tips last for new site,you most do more accurate search for the table needed on that site.
import pandas as pd
import requests
from bs4 import BeautifulSoup

res = requests.get("http://web.archive.org/web/20041020000138/http://www.raf.mod.uk/bbmf/displaydates.html")
soup = BeautifulSoup(res.content,'lxml')
table = soup.find_all('table', align="CENTER")[0]
df = pd.read_html(str(table))

# Clean up,put index(Date location...) at top,delete 2 first row
df = df[0]
df = df.rename(columns=df.iloc[0])
df = df.iloc[2:]
df
Reply


Messages In This Thread
RE: Trying to Tabulate Information from an Aircraft Website Link(s) - by snippsat - Jun-24-2019, 06:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to insert Dashed Lines in between Rows of a tabulate output Mudassir1987 0 1,132 Sep-27-2023, 10:09 AM
Last Post: Mudassir1987
  pandas, tabulate, and alignment menator01 3 11,068 Feb-05-2022, 07:04 AM
Last Post: menator01
  display the result of Dataframe in tabulate format alex80 0 1,795 Sep-09-2020, 02:22 PM
Last Post: alex80
  How to tabulate correctly repeated blocks? Xiesxes 4 3,999 Mar-21-2020, 04:57 PM
Last Post: Xiesxes
  Obtain Geometric Information and name from a map-design website fyec 2 3,213 Aug-08-2018, 05:11 AM
Last Post: buran

Forum Jump:

User Panel Messages

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